Someone in the thread mentioned that to get the benefits of micro services in a monolith, you can use a lunging rule to prevent dependencies across modules
Share data, not state.
In Rust this is a pretty good use-case for channels, which can be used to send messages across threads.
fubo@lemmy.world 1 year ago
Microservices are great if you have enough traffic that you can get an efficiency gain by independently scaling all those services. But if you aren’t deploying onto thousands of servers just to handle traffic volume, you probably don’t need 'em.
MsPenguinette@lemmy.world 1 year ago
In defense of those startups, I’m sure most of are doing it because theyve got organizational PTSD from beeing places be too fucked to be able to update their architecture rather than just overeagerness.
fubo@lemmy.world 1 year ago
Well yeah, but you don’t solve that by layering more complexity on top of it. If you can’t yet release your code onto five servers without breaking the world for all users, you’re not yet into a place where you need fifteen microservices.
lysdexic@programming.dev 1 year ago
I don’t think that’s a valid take. Microservices have nothing to do with scaling or performance, at least for 99% of the cases out there. Microservices are a project- and team-management strategy. It’s a way to peel out specific areas of responsibility from a large project, put together a team that is dedicated to that specific area of responsibility, and allow it to fully own and be accountable for the whole development life cycle, specially operations.
Being able to horizontally scale a service is far lower in the priority queue, and is only required once you exhaust the ability to scale vertically.
lemmyvore@feddit.nl 1 year ago
Microservices are not just about scaling and performance but it is a core advantage. To say they have “nothing” to do with it is outright false.
Scalability isn’t something you pull out of the pocket when you need it, you must incorporate scalability by design in everything you do. (Same as with security, and testability, etc.)
Microservices are about modular design and decoupling units of code from each other. Having a bunch of pieces of code run together on a monolithic group of resources that you choose to scale vertically becomes a choice not the be-all-end-all way of doing things.
The problem with this approach is that switching from vertical to horizontal is extremely hard if you didn’t plan for it from the start. Thinking in monolithics is a very hard habit to break and it’s good odds that any platform that is steeped in verticality will be permeated by it at all levels. You can’t just come in and switch, you typically end up having to uproot and redesign a lot of things from scratch, which in most cases ends up as a non-starter from a cost perspective.