Heroku: web dino and working dino? How much / how much do I need?

I was curious about the difference between web and working dynamometers on Heroku. They give one suggestion for explanation on the pricing page, but that just left me confused. How do I know how many of them to choose? Is there an attitude I should strive for? I'm new to this, so can someone give a detailed explanation, or maybe somehow I can calculate how many and what dy I need?

In addition, I am confused by what they mean by the number of hours for each speaker.

http://www.heroku.com/pricing

I also got into this article. As one of the solutions they proposed, they said to increase the number of speakers. What kind of dynamo are they referring to here?

http://devcenter.heroku.com/articles/backlog-too-deep

+79
heroku web-hosting
Dec 08 '11 at 4:40
source share
5 answers

Your best sign, if you need more dinosaurs (like processes on Cedar), is your heroku magazine. Make sure you upgrade to advanced journaling (it's free) so you can delay your journal.

You are looking for heroku.router records, and the value that interests you the most is the value of the queue - if it is constantly greater than 0, then this is a good sign that you need to add using the speakers. Essentially, this means that there are more requests than your process can handle, so they are queued. If they are in the queue for too long without returning any data, they will be disconnected.

There is no perfect relationship. I'm afraid you might have an application that executes 100 requests per second, requiring many web processes, but just not using workers. You only need workflows if you are processing in the background, for example, sending emails, etc. Etc.

ps The delay is too deep - this is the Dyno web process that can cause it.

UPDATE: On March 26, 2013, Heroku deleted the queue and waited for the fields from the log-out.

queues and wait fields have been removed from the router log messages. In addition, the Heroku router no longer sets X-Heroku-Dynos-In-Use, X-Heroku-Queue-Depth, and X-Heroku-Queue-Wait-Time HTTP headers for incoming requests.

+56
Dec 08 2018-11-11T00:
source share

Dynos are basically processes running on your instance. With the new Cedar cedar, they can be configured to execute any arbitrary shell command. For web applications, you usually have one process called "web" that is responsible for responding to HTTP requests from users. All other processes are what used to be called "workers." They work constantly in the background for things like cron, processing queues, and any heavy computing that you don't want to associate with web processes. You can also scale each type of process so that multiple processes of each type are loaded for additional concurrency. The amount of each that you use really depends on the needs of your application and the load it receives. You can use tools like the New Relic plugin to monitor these things. Take a look at the articles on Process Models and Procfile at Heroku Hero Center for more details.

+15
Dec 08 '11 at 8:40
source share

A number of people mentioned that there is no known relationship and that the attitude of web workers to the background workers you want depends on how you developed your application - that’s right. However, I thought it would be useful to add that, as a general rule of thumb, you want your web workers, and therefore the controller actions they served, to be quick and very light to reduce the reaction time in browser actions. If there is some action in the browser that requires more than, say, about half a second of real time for maintenance, then you probably want to architect some kind of system that pushes the main part of this action into the queue.

You will then create standalone work dynamo (s) that will serve this queue. They can take much longer because there are no HTTP responses on their output. Perhaps the page that you provided from the initial request of the browser that clicked the action will serve some Javascript that starts a thread that checks if the request completes every 5 seconds or something in that direction.

I still can’t give you the ratio to work for the same reason as others, but I hope this helps you decide how to architect the application. (I should also mention that this is just one design out of many valid ones.)

+9
Mar 31 '12 at 2:59
source share

https://stackoverflow.com/questions/70618/ ... - Heroku went for random routing, so some speakers may have queue queues (while they serve a long request), while other dinosaurs are free. Avoid this by making sure all requests are processed very quickly in your web games. This will reduce the number of web speakers required by requiring more working speakers.

You also need to take care of your concurrency-enabled web application that only performs some Rails configurations - try Unicorn or carefully written code (for I / O that does not block EventMachine) with Thin.

You will probably have to try, not calculate how many speakers of each type you need. Make sure their new relic informs you of the dyno queue - see the link above.

+3
Nov 13 '13 at 23:16
source share

The short answer is that you need as much as you need for your queues to be omitted.

As John describes, if you start to see a queue in your magazines, you need more speakers. If you start to see that your background queues are too long (how you get this information depends on what you implemented), you need more workers.

There is nothing to do with it, as it depends a lot on the design and use of your application.

+1
Dec 08 '11 at 15:59
source share



All Articles