News for hackers. Stuff that matters.
Re:Show HN: I finished my site for daily dogbunny puzzles, a... by drcode on Thursday November 17, 2022 @02:20PM (#33644172)
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

Re:Show HN: I finished my site for daily dogbunny puzzles, a... by fragmede on Thursday November 17, 2022 @02:27PM (#33644265)
turn off statistics for the next day or so.
Re:Show HN: I finished my site for daily dogbunny puzzles, a... by ovex on Thursday November 17, 2022 @02:47PM (#33644558)
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;`.
Re:Show HN: I finished my site for daily dogbunny puzzles, a... by drcode on Thursday November 17, 2022 @03:14PM (#33644960)
this is super helpful, thanks

all stuff I don't know but I should