Why should I use a PaaS service like Heroku for a SaaS app?

Bahaïka

My team and I are currently building a Ruby on Rails web application (SaaS model) that will be used by at least 5k users, and there will be probably more after. While we reach the end of the development process I was wondering what kind of hosting we were going to use.

I first thought about using a standard web server with Nginx and Puma, and a second server dedicated to the database, but the scalability is a thing that we really want. So I started to check for an alternative solution (knowing the fact that no one of our team is an admin), and I end up on Heroku.

So, my question is why should I use something like Heroku ? After watching the prices I've the feeling it's going to cost more than a standard server for less performances, but i'm still intrigued by it : if people use it, there must be a reason.

Richard Peck

Heroku & DigitalOcean etc, are just services which make deploying to "cloud" hosting easier. Heroku uses AWS's computing infrastructure to host your apps, but provides an environment to help deploy them easier:

Why do people use Heroku when AWS is present? What distinguishes Heroku from AWS?


Heroku vs...

Some of the important points to note about Heroku is you don't have direct access to your database, as well as relying on their infrastructure to hold up (E.G if something happens to their datacenters -- which has happened before -- you're at the mercy of Heroku & AWS's engineers).

There are two issues we have with them:

  • You're obliged to use their AWS Postgres DB
  • You've got to route through Heroku's domain

--

Choice

The choice you really have is whether to use something like RackSpace (like us), or use a service such as Heroku or DigitalOcean. To me, there is not much difference, as Heroku / DO just provide an environment to push to VPS's running on their respective partner hosting providers.

With the ease of deployment (git push), you get the downside, which is your database, environment etc will not be directly configurable. I.E if you use Heroku, it's very difficult to get off it (transferring data etc).

By using a direct solution, such as RackSpace or AWS, you are in control of the environment, which means you get direct access to your database, dependent services & other aspects of the system. Of course, it comes with more maintenance, but you aren't locked into one system, as you are with Heroku

--

System

In terms of the system, Heroku locks you into using their domain infrastructure:

The domain example.herokuapp.com will always remain active, even if you’ve set up a custom domain. If you want users to use the custom domain exclusively, your app should send HTTP status 301 Moved Permanently to tell web browsers to use the custom domain. The Host HTTP request header field will show which domain the user is trying to access; send a redirect if that field is example.herokuapp.com.

This is coupled with the lock-in of using the likes of different dependencies & other aspects of the Heroku system. It's basically a store-front for Amazon's AWS infrastructure

--

Recommendation

If you expect to have 5k users, I would highly recommend looking at setting up your own environment, probably with RackSpace (as we use them).

It's my opinion that Heroku is great for developers who just want to get an app up-and-running, but it's not very good with providing an environment you can control.

Some examples of this include your database - setting up on Rackspace etc means you get to define your database yourself. On Heroku, the db is kept in a third party datacenter, which you never see (try setting up PHPMyAdmin on Heroku)

Another example would be how you're going to scale the application. If you have memory leaks etc, you'll be far better positioned to have your own stack in place, rather than relying on someone else's. It allows you to define the specific details of how the app should operate - giving the ability to scale much easier

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Why should I use a PaaS service like Heroku for a SaaS app?

From Dev

When and why should I use a domain service?

From Dev

Should I use an ORM like SQLAlchemy for a lightweight Flask web service?

From Dev

Why should I use App Engine for such a simple task?

From Dev

PaaS, SaaS or IaaS for Wordpress

From Dev

Should I use a windows service?

From Dev

Which UserControl should I use to have similar behavior like WP8.1 Calendar app?

From Dev

Why should I use interfaces?

From Dev

Why should I use UTC?

From Java

Why should I use SerializeField?

From Dev

Why I should use a JPanel?

From Dev

Why should I use glTranslate?

From Dev

Why should I use Simple Queue Service (SQS) over ElastiCache on AWS

From Dev

Should I ever use @Transactional on a Service class

From Dev

Should I use self or this in service worker?

From Dev

When should I use @Component instead of @Service?

From Dev

Which paypal service should I use

From Dev

Which context should i use in a service?

From Dev

Can I use sqlbulkcopy with Azure SQL Paas?

From Dev

Should I use sessions in Google App Engine?

From Dev

In Scala; should I use the App trait?

From Dev

Should I use in-app purchases in this case?

From Dev

Should I use sessions in Google App Engine?

From Dev

Which technology should I use for a new app?

From Dev

Should I use viewport meta in an electron app?

From Dev

Microservices in app with low load should I use?

From Dev

Why should I ever use "getattr()"?

From Dev

Why Should I use virtual base classes?

From Dev

Why should I not use the PictureBox control?