Q-Con / qcacher

eSports & Gaming CDN cache service
19 stars 4 forks source link

Add support for multiple sniproxy instances #30

Open Stealthii opened 6 years ago

Stealthii commented 6 years ago

To prevent blocking of HTTPS connections if the one sniproxy is overloaded, we should look into support for multiple SNIproxy nodes listening on the same port.

Upstream sniproxy added support for reuseport (https://github.com/dlundquist/sniproxy/commit/1cbba1b46c52806df24b1689a4501b1ac36110d3).

cmavromichalis commented 6 years ago

Not sure of your setup in terms of machines available to be workers/masters but looks like Docker swarm could do this.

I am interested to hear that sniproxy is being overloaded. Do you have a way to force overloading it/measure the requests until it tips over?

Here is a link if you want to try

https://github.com/cmavromichalis/qcacher/commit/52324229c0990dd870c1b131082ee3d05b4fbdef

docker-compose build
docker stack deploy -c docker-compose.yml qcacher
docker service ls

I threw in visualizer so you can check two instances are running. It's a handy tool, navigate to http://your-local-ip:8080