Heroku XL
heroku.com
heroku.com
Routing requests to random dyno is definitely not the smartest routing algorithm because it kind of defeats the purpose of having a routing layer. If you are not aware of the issue between Heroku and Rap Genius, I will think it is important enough for anybody who considers Heroku to be aware of. Here is the URL with relevant information: http://news.rapgenius.com/James-somers-herokus-ugly-secret-a...
There are systems that do benefit from other kinds of routing but there is very little margin to favor non-concurrent request handling in mostly state-less components like web servers. There are lots of responses on the web that take a much deeper look at the heroku router if you care to search. The conclusion is not so clear that Heroku is doing it wrong.
That's not a change; that's how routing on Cedar has always worked.
- http://wiki.nginx.org/LoadBalanceExample
- http://serverfault.com/questions/537450/what-algorithm-does-...
The problem with only 1 concurrent request is that if that request takes long to process then it can block other requests that are queued up in that dyno. Lets say that 1% of the requests take long. If a dyno can process only 1 request concurrently then at each request there is a 0.01 chance that that will block other requests. If however it can process 4 concurrent requests, then the dyno will only be blocked if it gets 4 long requests at the same time. So there is only a 0.01^4 = 0.00000001 chance that a dyno will be blocked.
There are workarounds, which require some legwork and forsight.
Reducing the pitfalls inherit in deploying a web app is generally what Heroku is selling. It is why they are making the big bucks. It would have been nice if Heroku would have been able to find a solution and implement smarter routing so that this just became a non-issue.
XL Dynos let you throw money at the random routing problem which helps routing efficiency at the expense of spend efficiency (b/c they are a lot more expensive and scaling down to 1 XL dyno is still pretty expensive).
In my opinion, if you're using anything other than 1X dynos on Heroku you are compensating for some other part of your stack being broken.
We're probably months away from Heroku having some serious competition in the super easy PAAS space. Heroku's high prices have summoned competitors en masse, and by some stroke of luck Amazon has not really made a serious effort to encroach on Heroku's profits.
Python may be on the wrong side of this, though, as long as Gunicorn is the de-facto standard WSGI server for Python apps on Heroku.
You may want to read this section: https://blog.heroku.com/archives/2014/2/3/heroku-xl#understa...
Performance dynos give you much higher performance and much better consistency, resulting in dramatically reduced tail latencies over 1X and 2X dynos.
Choosing performance dynos for a high-traffic or performance-sensitive app is definitely not "compensating for some other part of your stack being broken"; in fact it's a very smart choice.
Amazon hasn't, but there are a reasonable number of simple PaaS competitors these days:
Microsoft's Azure (http://www.windowsazure.com/en-us/pricing/details/web-sites/): ASP.NET, PHP, Node.js, Python
Red Hat's OpenShift (https://www.openshift.com/): Java, Ruby, PHP, Node.js, Python and Perl
Nodejitsu (https://www.nodejitsu.com/): Node.js
You can call these issues "bold decisions." In my opinion, it reads more like, "We don't know how to fix the problem. If you really want to pay for it, we will let you skip our routing layer and solve the problem yourself."
It is a bit disappointing. However, I've never had to write a routing layer to handle 60,000 requests a second, so I can't really fault them.
I love Heroku's service, but it's starting to get very expensive. This $576/month plan proves it. :/
edit: Oh, and you are getting vendor-locked and they can go Google-App-Engine on you.
If you compare this to deploying to "choose a generic VPS" the lock in is substantial. If any of my apps fail, I'm comfortable I can provision an Ubuntu VPS from any provider with a one line chef command and then deploy to it with one more.
So although Heroku isn't locking you in through any bad practices on their part, by using them you're choosing to make your workflow very specific to them. To me and quite a few of my clients, while Heroku is awesome for getting started, there isn't enough benefit for the increased single provider dependency and costs.
Not hating on them at all, I use them quite regularly, but I can understand where people are coming from when they talk about Vendor lock in. Perhaps a more accurate description would be single vendor dependency.
If you're using Heroku sure you could write that cookbook but in 90% of cases it's going to end up being unmaintained because it's there as a contingency that no-one uses in their everyday workflow. What's more for it to have real value it needs to be tested regularly to make sure it actually functions as expected.
So it's definitely possible to avoid the dependency as long as you don't mind adding a big chunk of devops work. At that point you've got to ask why are you paying the premium for Heroku if you're maintaining the devops expertise and codebase to deploy to a VPS alongside?
It was .055 / hour when it launched in 2009. Back then, EC2 small instances cost .10 / hour (http://aws.amazon.com/about-aws/whats-new/2009/10/27/announc...).
Now? Heroku is .05 / hour, and small EC2 instances are .06 / hour. This is why I stopped using Heroku a year or so ago for anything I plan on paying for. They just let Amazon keep driving down their bottom line without passing any of those savings onto their customers.
I kinda feel like the service is either worth it to you at the price they're charging... or it isn't. I don't particularly care what their wholesale costs are.
Would the price for Heroku magically become "better" if they decided to switch from Amazon to a more expensive or less efficient backend? That can't be right.
Heroku has many alternatives -- hosting directly on Amazon among them -- but (IMHO) there are not many direct competitors. Doing it any other way involves different tradeoffs of time, money, skill, and maybe lock-in risk. I sometimes buy a burger at a restaurant even though I know I can make one at home. That doesn't automatically mean it was a bad call even if raw beef is on sale at the supermarket.
This is what you're paying for. The cost of that is the difference between hosting yourself on Amazon and what Heroku charges. That's the cost to your business of using Heroku. This cost has steadily increased. This isn't rocket science, and it certainly isn't burgers at a restaurant. I get that for some people that cost is a worthwhile expenditure, but as that divide widens, the number of people it makes sense for will decrease.
To try and equate this to your burger analogy, if raw beef kept dropping in price, but restaurants all charged the same, more people would cook at home, no? Now, imagine you're feeding 100 people a day. At some point the cost savings of cooking the beef far outweighs the luxury of sending 100 people to a restaurant.
Another thought: When you use Basecamp, are you calculating how much they are spending on hosting your data?
sure, you could run into some issues while doing it yourself but that risk isn't worth nearly $600 p/m IMO
For most production apps, you'd need at least a part time ops person to do things right. That's the kind of cost Heroku saves you.
I wonder if i could reproduce this kind of workflow on my own server, since i dont really need load balancing or auto-scaling for most of my apis.
https://github.com/progrium/dokku
It's even based on heroku buildpacks so it's very compatible.
Having built a couple of cloudy services, I can confirm that these far dominate your costs at scale.