Skip to content
This repository has been archived by the owner on Apr 7, 2020. It is now read-only.

No-downtime deploy #51

Open
ryanhugh opened this issue Dec 30, 2017 · 2 comments
Open

No-downtime deploy #51

ryanhugh opened this issue Dec 30, 2017 · 2 comments
Assignees
Labels

Comments

@ryanhugh
Copy link
Owner

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 ryanhugh self-assigned this Dec 30, 2017
@ryanhugh ryanhugh assigned dajinchu and unassigned ryanhugh Sep 7, 2019
@ryanhugh
Copy link
Owner Author

ryanhugh commented Sep 7, 2019

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

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

@dajinchu
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants