Performance
-
Hi, this drop-in replacement for Github Pages works great.
Looking at the source code, it looks like the pages are served directly by the Express framework in NodeJS; correct? I wonder how well this performs under load; any estimates/experiences? (we are considering hosting redecentralize.org on our own server, but are a little worried about e.g. a slashdot effect taking it down when it is needed most..)
The Express docs suggest running e.g. nginx as a cache in front of it, might that be a good idea? And if not, perhaps at least the app could use gzip compression?
(besides, using an nginx server might also be useful to e.g. obtain server logs for statistics, but that’s a separate question)
-
@gerben That's correct, the app is just served up using express.static. I don't have any performance numbers but it should work fine for normal loads like say even 100 hits a second. For higher loads, I recommend fronting the site with something like cloudflare.
Currently, there is already a nginx in the front (the reverse proxy) but the app does not have caching. Note that both caching and gzip won't really add that much speed since most sites are mostly static pages are small enough to not be useful for zip and unzip operations (just cpu load). The reverse proxy does have http2 so we should see the benefits of parallel/concurrent http requests.
For nginx logs, services -> nginx should have the logs
On a side note, currently the app uses git+http auth, I plan to move it to ssh key based auth soonish. Any other suggestions welcome!
-
@girish Thanks for the response!
For higher loads, I recommend fronting the site with something like cloudflare.
We might indeed try use such a CDN if it turns out to be needed (probably not cloudflare, to not centralise the web too much). Ideally people would all just get our site via peer-to-peer delivery instead.
@girish said in Performance:
@gerben BTW, is the site already on GitHub pages app?
No, currently our server runs a copy at web.redecentralize.org; from this speed test it looks like you’d have 1.66 second when visiting from San Francisco (to Amsterdam). Not as good as the 550ms I get for redecentralize.org (i.e. GitHub’s servers/CDN), but acceptable I guess. I see we could also trim some file sizes..
I also found https://redecentralize.org/interviews/ (fantastic!), this is going to keep me occupied for a while
Enjoy.
-
@gerben said in Performance:
We might indeed try use such a CDN if it turns out to be needed (probably not cloudflare, to not centralise the web too much). Ideally people would all just get our site via peer-to-peer delivery instead.
Totally agreed. We self-host pretty much everything (other than the servers itself). Though I suggested Cloudflare, I was really nudging you towards maybe using a CDN since CDN has it's use cases. People have suggested BunnyCDN as well. That said, we don't use CDN ourselves, even for https://cloudron.io and https://docs.cloudron.io. It's served from surfer. This is mostly for ideological reasons, we are willing to give up on some speed and not centralize (we used to have it on AWS Cloudfront before).