2 ms·
> Why the load balancer if the app only serves family and friends, and maintenance windows are okay? It should be able to run on a single server. I use DO to m
by movedx 8y ago
> Why the load balancer if the app only serves family and friends, and maintenance windows are okay? It should be able to run on a single server.
I use DO to manage the DNS for the domain. I use their LB to manage the TLS cert for the domain. By doing this I don't have to manage TLS connections in my application nor deal with certification creation and rotations. DO are doing it for me for $10/month. That's a bargain given my time is worth $100/hour.
I can also easily swap out the backend server, or add more, as I see fit. This falls in line with your zero-downtime argument. The LB is there and ready to go should I want to attempt such things :)
> In some cases, it's more than "a few seconds of downtime". In one of the apps I maintain, some requests accept file uploads, and some stream long .csv files that are generated on demand. These requests can take several tens of seconds. If the system is unable to start a new version of the app, and switch traffic to it, while keeping existing connections to the old version, then we're talking about at least 1 minute of downtime.
But this is the key point of it all: your application and its users demand zero-downtime. My mother (in-law) does not :)
> I'm oversimplifying a bit, but it's basically running `docker swarm init` and replacing docker-compose with `docker stack deploy`. I recommend it.
Looking into it right now. Thanks a lot for the recommendation.
- ngrilly 8y agoRight, DigitalOcean load balancer is really handy! I'm curious to know what you think of swarm after you tried it :-)
- movedx 8y agoHi. It's very good. I will likely deploy my application to it and eventually, move an open source hosting platform I'm building into it too. It's simple and gets to the point. Thanks for the recommendation :)
- ngrilly 8y agoHi. Glad you liked it! I like Docker swarm lightness and simplicity, but I regret there is no official and built-in solution to automatically attach/detach volumes associated to a service (for example backed by Amazon Elastic Block Storage, Google Persistent Disks, or DigitalOcean Block Storage volumes). I also miss the concept of pod (the ability to colocate multiple containers on the same machine and let them share the same networking stack), and the ability to launch one-off jobs (for example to run database migrations). On a single-node cluster, these problems don't exist, which paradoxically makes Docker swarm a great solution for single-node clusters :-)