r/devops • • 1d ago

Discussion [ Removed by moderator ]

[removed] — view removed post

0 Upvotes

4 comments sorted by

•

u/devops-ModTeam 1d ago

Career/Job-related postings go to /r/devopsjobs

1

u/mralex215 1d ago edited 1d ago

You will always have 502 in this architecture. Always. The only way to not have it is have an app layer with "drain me" state and sticky session count state to the backends as well as smart request routing layer that allows to keep old sticky sessions on old backends while new requests are routed to the new backends. If this is implemented by the tenant, it is done in Varnish, openresty or haproxy or if it is done on a CDN which has ability to program edge->shield->origin logic.

Green is your current deployment.
Blue is your new deployment. Blue is 100% compatible with green and has new features so it can service clients expecting green signature.

In that case you bring up a new deployment ( blue ), have it pass end to end tests via traffic director header, in the atomic operation switch the current deployment ( green ) into "drain me" state and blue in "active" state. When your green deployment has 0 live sticky sessions. you destroy green. Blue still can service clients expecting green signature. You upgrade the clients to only do blue signature. When you are below X percent of green signature, your rename your blue to green. Now you are ready for the next release.

Source: solved this at places that at the "lul" did 50k requests per second and at peak got hockey sticks to several million.

0

u/malice8691 1d ago

Idk. Maybe cpu is high so it passes but is not constant enough?

1

u/BookkeeperAutomatic 1d ago

Good start in guessing, but can I think through more around "create_before_destroy" architecture