searchneu icon indicating copy to clipboard operation
searchneu copied to clipboard

No-downtime deploy

Open ryanhugh opened this issue 7 years ago • 2 comments

It would be pretty cool if we could deploy with no downtime. Currently, there is 1 to 2 seconds of downtime every time the prod branch is pushed. I am thinking that one way we could do this is have two instances of the searchneu backend running on the EC2 server and listening on different ports. Nginx would send requests to both of these instances. Then, when we are updating the server, we can take update these instances one at a time and the the site will be up the entire time.

ryanhugh avatar Dec 30 '17 19:12 ryanhugh

Now that the backend is ElasticSearch, this could be easier. Give this a read!

https://www.elastic.co/blog/changing-mapping-with-zero-downtime

ryanhugh avatar Sep 07 '19 17:09 ryanhugh

Yeah with elasticsearch we should also make use of index aliases: reindex everything to a new index, then swap the alias to point at the new index, which is an atomic operation

dajinchu avatar Sep 22 '19 01:09 dajinchu