📜 ⬆️ ⬇️

Heroku and Russia

Million times already heard that doing a project on Heroku is a sign of poor knowledge of linux-systems and banal laziness. On the one hand, there’s something in it, but on the other side of the application, in this case I’m talking about Rails applications, one line and no problems with setting up the machine — this is awesome. So let's talk about the myths against heroku that I've heard a few hundred times.


For small projects, real looting.
Heroku should not be used for business cards. Well, for starters, RoR does not need to be set up for business cards, unless your business card has any wonderful ruby ​​script ... and even then you can do with the sinatra framework. But that's not the point, now in H there is an opportunity to choose a server in Europe and you can run a business card on one free dynos, which is enough for a business card with a head. As a result, the cost of your hosting - $ 0.00

What about file attachments?
Many people do not understand at all why there are no file attachments, but even if it is needed, that is, there are simple and inexpensive implementation options. The first is Amazon S3 (there is a whole episode of Railscast ), but if you only have images in attachments and again you don’t want to spend money, then you can find an implementation option with Flickr.
')
Naked domain does not work.
It does not work for a reason, but due to the fact that your application does not have a direct IP address, but everything is simple here. Create a CNAME record for the domain www.name.ru and send it to name.herokuapp.com, and for the record A we set IP: 174.129.25.170, which will make 301 redirects to your domain from www. Price $ 0.00 If you are paranoid and you are afraid that the aliens will capture the free fitch from wwwizer.com, then use the addon on Heroku itself, which is called Zerigo DNS - up to 50 thousand requests per month will be redirected.

Dear DB.
Before the appearance of the Basic tariff, which many of my comrades stubbornly do not notice, it was a bit heavy. But now for $ 9 you can get a Postgres database of 10 million lines, while for those who are worried about the size - as much as 1TB.

Very long page loads.
My site is on a European server and an Amazon bucket is also in Europe. Here are the results


It is not clear how to put cron.
In Heroku there is a more convenient scheduler - Heroku Scheduler Standard , my tasks run every hour, by the way the visual interface is very convenient. It requires 1 worker dynos to run. But it can be included on demand and will not spend money around the clock.

Here are the things that usually poked in the nose in the first place. But in fact, I am glad to use Heroku and I hope for the emergence of a large number of new add-ons that allow you to simplify the programmer’s life and focus on the application code, and not on setting up the machine.

Source: https://habr.com/ru/post/185998/


All Articles