3 ms·
Please take this comment in good faith because I'm genuinely curious: why do you need a kube managed cluster of N nodes (an now 4x N) to host a static blog? I w
by skrebbel 7y ago
Please take this comment in good faith because I'm genuinely curious: why do you need a kube managed cluster of N nodes (an now 4x N) to host a static blog? I wonder what works goes on under the hood that this needs such scale.
- davnicwil 7y agoThe blog is just attached to the product site https://boxci.dev https://boxci.dev, thats the reason for using kube. Should be separately hosted but this was just simpler. The static blog pages though are all cached via nginx so I was surprised I needed to increase the nodes & relicas. Short answer is I don't know, and will need to investigate, but I suspect it's because the kubernetes node instances themselves are fairly low powered, there's a low cpu limit on nginx, and perhaps nginx is doing a lot of work serving the js bundle to so many simultaneous users, which really should be hosted on a CDN (probably also the blog).
- marcosdumay 7y ago> Should be separately hosted but this was just simpler. Probably shouldn't. If you are already managing an automated environment, creating another environment that is easier to manage has nearly no upside. Unless that phrase was meant to use the CDN you talk about later, but again, do you need a CDN to solve the easiest part of your infrastructure? (Or rather, do you have enough traffic so that it isn't the easiest part?)
- davnicwil 7y agoYeah my phrasing wasn't that clear there but I essentially meant hosted as in cached on CDN servers, just to reduce load on the nginx instances. Though my best guess at the moment for what was causing things to be slow was just sending the JS bundle to so many simultaneous users. Putting that on a CDN may be enough.
- oblio 7y agoThe real short answer is: he doesn't, he could just use Github Pages or similar :-) I'm guessing he likes to tinker.
- davnicwil 7y agoTo be honest that's not it - as in my sibling comment it's just attaching the blog onto the site was the fastest way to go, given that I wanted to keep it on the same domain. The product just happens to be built on kubernetes already, use of kube is definitely not for the blog. I'm actually pretty surprised that nginx couldn't handle the traffic to be honest. Even with the fairly low resources I'd allocated it. It's just cached static content served right from nginx you're seeing there. Now I've seen that this setup isn't really appropriate (at least without being very expensive!), I'll spend the time to put it onto a CDN
- oblio 7y agoIf you're not worried about the privacy & co. stuff, Cloudflare is free and it's probably the best option for you.