EnCiv / undebate

Not debates, but recorded online video Q&A with candidates so voters can quickly can get to know them, for every candidate, for every election, across the US.
Other
20 stars 14 forks source link

Load balancing on heroku #276

Open ddfridley opened 4 years ago

ddfridley commented 4 years ago

In order to scale up for the Nov 2020 elections, we need to have the ability to do load balancing on heroku, as a tool in our pocket.

We are not looking for the perfect solution, just something what we can implement in the short term that works.

The head of the load balancer will need to be the cc.enciv.org domain, but we will need to test with another domain name before we switch over.

While we are doing load balancing, we will still need to support HTTPS.

Multiple undebate severs will spin up and connect to the same Mongo database URI. The proxy/redirect will distribute requests to the undebate servers in a round robin fashion (or whatever is simplest), without trying to figure out the load.

When a user visits a URL, would we proxy the request to the undebate server, or would we redirect? What's works, what's fastest to implement.

Would NGINX be a good choice.

ddfridley commented 1 year ago

Turns out we were able to do really well putting a reveres cashing CDN in front of the sever and didn't have to change the server at all.