|Comments/Answers inline - tagged RR. |
On Jan 10, 2013, at 12:32 AM, meghdoot bhattacharya wrote:
RR: This is how we do it today -- config change and then reload with -sf in the port proxy running on the node [outside the gear] as well for the
case of haproxy (running as a router for scalable apps). But this is something that works well for connections that don't persist over time - not all
traffic is equal. Works fine for http/https traffic with some caveats for persistent connections/keepalives but let's keep that aside for a bit.
In the port proxy case, if the proxied port is to a mysql service, then killing the connection has a much greater impact. So there's some issues there.
RR: Unfortunately not a straight forward solution - some ideas below.
Using multiple scaled apps would be the simplest solution and you could even use one of those (or a couple if you need) to work as federator to
push code to all the others when an application is deployed to it. Really talking app clones here w/ a single DNS entry pointing to clones.
That would also take care of redundancy and remove any single failure or choke points, since those seem to be your major concerns.
You don't need N different PaaS Systems -- its just 1 PaaS with multiple copies of the app.
If that does not work for you, then this would really need a custom home-grown solution on your end:
1. As Mike mentioned, just take a list of all the serving gears and add them to your Load Balancer. Of course auto-scaling is something you'd need to handle
yourself + need to keep the routing entries in sync.
2. There's other variants of the above approach - using routing clones. Example - create a bunch of tiny applications (could be scaled apps or
DIY apps running haproxy - this is your routing clone) and then have a custom script maybe puppet/chef to push the configuration from your
app's haproxy gear to these haproxy clones. Register all these clones in your LB or use DNS.
RR: There's a min/max setting for scalable apps - so you set this to 100,100 [that means you basically start w/ a 100 and stay on that].
Depending on which version of the software (origin/enterprise), you could use the web ui or might need the rest api to set that and then
may need to send a request to make the broker satisfy the app dependencies (simplest way may be to add/remove a cartridge or
I guess you can try a scale event add/remove gear).