New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ps:scale implementation #1117
Comments
Here are my initial, somewhat rambling thoughts
Thats a real blocker as many common types of applications just can't be deployed with dokku without it. While it might not be our preferred long term strategic approach, it's a good, solid solution people can use immediately and it gives us time to reason about a dokku solution. Are there any pressing downsides that require urgency? As @michaelshobbs mentions, there are a number of issues that tie into this like CHECKS and thinking of a scaling model (container vs process) Re Question 1 As far as CHECKS go, I think we want to be careful to avoid being so CHECKY that a dev can't deploy an app that isnt working yet. I worry that if we go overboard on multiprocess CHECKS, the checks will be very fragile and the slightest problem, or more likely a learning curve for dokku users will lead to mistakes and pushing an app to dokku will be a huge hassle and difficult thing to achieve. (Which seems to me is the opposite of what we're after) I curious to see how the CHECKS are received by other users. For one thing, I'm sure we're going to get repeated versions of this question:
On that note, the default check could probably benefit from some logging pointing them towards more efficient checks. eg "You are using the default and likely inefficient availability CHECK. See to learn how to tune the CHECKS to your app" (If folks agree, I will take care of this) |
Yeah, I don't think we're in any rush at all actually. I do think, however, its been on the backburner for quite a long time. So having the discussion again seems prudent. Regarding checks and early stage dev, I think we cover this case well if a dev does not include a CHECKS file by just making sure the container stays up. Would you agree? My thinking on non-web process containers is that we would just use the default check to start. Any suggestions on implementing custom checks would be great too but probably not necessary in the initial pass. The issue here is, if we do have a CHECKS file, how do we know which container to execute against? Also, I think printing out some message with the URL to the checks docs would be great in the case of no CHECKS file. |
So in doing some rubber duck "debugging" I had the thought we might just adjust the CHECKS file format to include the process name which would map to a container that we'd test against. |
Are there any services on heroku with a "checks" type functionality? I'm thinking about how we might want to abstract this so that it would work regardless of application type. |
Another thing: Can we have multiple http processes? How do we handle exposing multiple ports properly? |
I think a 10 second start rather than 35 is a much better default (or even 5). @joshco feel free to pr the logging output change. |
|
Derp that last one. Not sure what I was thinking. It's either going to stay up or not. 10 seconds is good with me. I'll include it in the forthcoming PR. |
Next question: How do we return data from |
Are the logs aggregated on heroku? I think we need to provide both aggregated and non-aggregated versions of log output. |
Yes they are aggregated. |
Agree on the retries for the default check. Sent from my iPhone
|
@joshco retries on the default check don't make much sense because we're not attempting to connect to the container; just checking that it exists. So a retry won't do anything useful. |
Using a retry will let us reduce the wait time for the default check. Now any deployment blocks for 35 sec which the majority of time is unneeded. Sent from my iPhone
|
Btw, I'm working on a generic health check utility for Docker containers that might help out with some of this. |
Workflow question: I've made the logging changes to guide the user towards the checks examples to tune CHECKS. |
@joshco I think we're referring to two different executions paths perhaps. In this block we sit for x number of seconds, check if the container is still around and then I think the only change that's probably necessary is to drop the default timeout to 10 seconds as previously discussed. |
A new PR would be best I think. |
Done: #1119 |
Closing as there is an open PR - #1118 - where we should contain any future discussion. |
I believe this initially started with wanting to provide a core method of scaling processes on the same machine. #298 was the first attempt at this implementation but was not accepted as we let it sit around for too long. (I think)
Some questions come up in the new world of dokku that include things like zero-downtime checks and dockerfile deployments.
Issue/Question 1: Currently the zero-downtime checks rely on a web service being accessible for dokku to 'ping'. Therefore, if we run each Procfile entry in its own container things like workers can't be checked in this same manner.
There are two potential ways to go here. First would be to scale at the container level and somehow detect that a listener is running, then run checks. Otherwise, use the default container 'uptime' check we run when an app does not have a CHECKS file. The second method would be to use a similar pattern to the dokku-supervisor plugin and use a process manager in a single container to handle scaling.
Issue/Question 2: How should we scale dockerfile deployments.?
I don't use this method today and not sure I have a full grasp of implementation details. However, I think these can 'easily' be scaled using the multiple container approach.
refs: #733
ping @progrium @josegonzalez @joshco
The text was updated successfully, but these errors were encountered: