2 ms·
Just a small comment, blue/green usually implies some sort of load balancing, here OP is just flipping a switch that changes a hostname and flips the roles of b
by moralestapia 4y ago
Just a small comment, blue/green usually implies some sort of load balancing, here OP is just flipping a switch that changes a hostname and flips the roles of blue/green from staging/production.
Nothing bad with that, thought, and part of its genius is how simple it is.
- akoncius 4y agowell balancing is done on DNS level, and it’s not required to have literal loadbalancer.
- moralestapia 4y agoBlue/green usually involves moving traffic from blue <-> green gradually. You usually do this with a load balancer. That is all.
- outworlder 4y agoUsually, yes. But now some[one|thing] will have to do the monitoring and gradually ramp up traffic, rollback, etc. It's perfectly ok to immediately flip the entire traffic if you are a one man shop and your customers will tolerate it.
- abrookewood 4y agoI've never heard that the gradual moving of traffic was a requirement for B-G deployment (though it is helpful), just that you 'flip a switch' between one running server and another one.
- xani_ 4y agoYou can still do that in this kind of setup, just put loadbalancer like HAProxy on both that sends traffic to both nodes but prefers "the one that's local" in default config. Then you can use the LB to move traffic as fast or as smoothly as possible, and it also masks failures like "app on current node dies", as the traffic near-instantly switches to the other, at some small latency cost. This also gives you a bit more resilience, if the app on node dies (out of memory/disk/bug/whatever), the proxy will just send the traffic to the other node without having to wait for DNS to switch
- justsomehnguy 4y agoLooks like all of you in this thread missed this line: > I’ve already mentioned my 2 application servers. But the magic thing that makes it all possible is a floating IP address from DigitalOcean. To the user nothing changes, including IP.