Hacker News new | ask | show | jobs
by drcode 1311 days ago
The problem is I'm not big on devops, so I was just hoping "things will be fast enough"

I just modified the server to serve all images from a cloudflare-based source, hope that will help

Also, it's definitely not just static stuff, it tracks full statistics on how people did in the puzzles so they can compete, and I didn't go very deep on optimizing that yet

1 comments

turn off statistics for the next day or so.
Now that it loaded again for me, I can see the /graphql endpoint. Caching GET requests to endpoints for a few minutes (or even just one minute) will likely suffice, given that the puzzle is the same for all users. If I am not overlooking anything, stats will lag behind for that period of time in the worst case. More info on how to configure nginx can be found on https://docs.nginx.com/nginx/admin-guide/content-cache/conte.... When a 502 error is served, images or bandwidth are usually not your problem but your backend that is too slow. In your case you probably only need `proxy_cache_path` to define the cache path, `proxy_cache` to specify the zone name you used with `proxy_cache_path`, and `proxy_cache_valid 200 302 1m;`.
this is super helpful, thanks

all stuff I don't know but I should