3 ms·
Serverless Providers and Effective Architectures
- jaredcwhite 6y agoI appreciate the honesty here. I just have one question: Given a Git-push-and-you're-done PaaS-style hosting provider (Render is my fav at the moment) that can easily scale from one tiny VM to…well, whatever you're willing to pay for…tell me again why I need to throw away decades of acquired monolith knowledge to architect my application as serverless?
- seveibar 6y agoRender looks very cool, thanks for sharing :) Monoliths and serverless are not exclusive. Serverless applications can and should be built as monoliths and should be able to run as a monolith e.g. via a container. Any platform that prevents you from doing this is part of the 90% bad group. Your knowledge probably mostly carries over. Stateless application architectures were around before serverless, Serverless just enforces most of the patterns. For example, Rails promotes a monolithic pattern that scales horizontally thanks to the stateless application principle of maintaining state inside the database (or separated data store) and only having ephemeral state on the server. This wasn't always obvious. But nowadays we know not to store images directly on the server's hard drive. Rails couldn't have anticipated the computation or memory constraints of serverless, which is why it's incompatible. Serverless is basically just stateless application design within a cpu and memory constrained system.
- jaredcwhite 6y agoI think there might be a mismatch between your definition of "monolith in a container" serverless (which I too find intriguing) and what people are actually promoting which gets called serverless—aka functions. Vercel for example: they literally showcase sticking a wad of code in each api route and go out of their way to tell people not to build with any past monolith-style patterns (Express for Node, Rack/Sinatra or Rails with Ruby, etc.) So you or I might get excited about streamlined container deployments (does Fly.io count in this world I wonder), but that's not people are talking about when they write their DEV.to tutorials on "serverless". =)
- seveibar 6y agoYep, like i said the cloud provider will lie about best practice to have you bake them in. Vercel is the best of the bunch IMO because their infrastructure components (e.g. micro) are open-source. But they have great workflows for monoliths tucked away.