by sickcodebruh · 3y ago · 0 comments
I’m gearing up to deploy a Nextjs project in the next few months and while I appreciate the claims of Function this and Edge that, I feel infinitely more comfortable with a couple small server instances, especially early on when my focus should be testing my product, not optimizing my cloud infrastructure for scale that might never be needed. I’m excited to give MRSK a shot and feel grateful to live in a time when there are so many good choices.
Not to mention vendor lock in, something that really needs to be talked about more with this new wave of function this and edge that.
In the past decade I’ve been on several teams that went out of their way to avoid vendor lock-in by refusing to use platform service offerings.
Every single time it was a complete waste of time. We could have saved a lot of time by embracing platform offerings and then trying to port to a different vendor only if necessary.
There are significant downsides to a lot of the vendor offerings, they seem like a simpler solution but they are plenty complicated in their own right. Particularly since they are probably built to accommodate varied and complex cases that you don't really need. And rarely is this paired away under some special dialog for power users, often you are expected to just know everything up front.
Howvever, there are many companies working within heavily regulated sectors that unfortunately need to be able to evidence a rapid ability to switch platforms AND exactly where data is stored and processed.
As such using very specific offerings in cloud providers is unfortunately not always an option. Something that is portable, even at expense of complexity or available dev time, becomes a non negotiable.
In that case, go with managed services like render, Heroku, or fly. MRSK, or any DIY deployment, is not going to save you the hours of tinkering you will inevitably do to get the non-server stuff up for even a low-usage production app: 1. One-click Deploys, basic CI/CD 2. Redis/memcache 3. Database / migrations / rollback / backup 4. Logging / metrics / down detection & basic high availability 5. Keeping up with basic upgrades
Soon as I have a couple of little home servers in place I think this will be a solid model for me.
> not optimizing my cloud infrastructure for scale that might never be needed
I don't understand why you would want a load balancer with that mentality. Feels like most companies will never reach a scale where load balancing is necessary.
sure the DB might still be a single point of failure as is the load balancer, but some rogue web processes hogging your single server or a disk failure bringing it down
Our LB does a bunch of heavy lifting for us. It handles SSL termination, static routing (we serve a bunch of content from S3), handles Auth for our internal "management" endpoints, and because we use containers it gives us health checks, auto restarts, and rolling deploys. I'm pretty sure we have about 30lines of terraform to support all of that.