3 ms·
I’ve yet to see an article which explores the pros and cons of different strategies and demonstrates each with examples rather than picks one and insists it’s b
by steve_adams_86 2y ago
I’ve yet to see an article which explores the pros and cons of different strategies and demonstrates each with examples rather than picks one and insists it’s better for arbitrary reasons.
I’ve used microservices, monoliths, serverless, and other similar permutations based around different core architectures (event buses, peer to peer, client-server). Some aspects of each were awesome. Some weren’t. Knowing why and how/when to leverage each is far more interesting than demoting or excluding a solution because you like another one more.
There are some suspicious ideas in here. “If your system needs more RAM, it needs more RAM. Why would you care about which part needs more RAM?” I suppose. But what if I only spin up a service once per day, and it needs far more ram than the rest of my system? I should use those resources for the 23 hours of the day that I don’t need them and pay for them nonetheless? It I don’t own my hardware, that’s an insane waste of money. Sometimes ephemeral services are a huge cost saver even for smaller teams… And it isn’t strictly due to poor communication. It’s a legitimate challenge presented by resource and finance constraints.
“Microservices introduce a lot of overhead in terms of communication latency” - sometimes this is perfectly acceptable. Say you have jobs you need done, and sometimes it goes from ten at a time to perhaps 100. A monolith would get bogged down severely. The client’s expectation of having the job done is likely not instantaneous if it’s something that needs to be sent to a queue. In this case, ephemeral job runners make sense. They can take on however many jobs they can at once, and if they’re maxed out, spawn another worker. This does not work well with monoliths in my experience. The communication overhead doesn’t matter here, as it could be worse if the monolith is bogged down while working anyway.
There’s more I don’t agree with, but I don’t claim to be a seer or anything. Maybe I’m just old and incapable of learning (though I do like the module approach as well).