4 ms·
There are many non-organizational reasons to use microservices. Here are some examples: As you add more functionality to a system, it gains different workloads
by foobazgt 4y ago
There are many non-organizational reasons to use microservices. Here are some examples:
As you add more functionality to a system, it gains different workloads, which have different needs (e.g. different storage solutions) and need to scale at different rates (e.g. one part of the system is very memory hungry and another is very compute heavy).
As your system gets larger, it's usually more important that its various components are well isolated, both on software and hardware axes, e.g. container isolation vs isolating across different physical zones/regions. Sometimes that isolation happens for security/compliance reasons, e.g. PCI.
As your business grows, you will need to build functional solutions that require different toolchains and platforms. You will acquire other businesses that have built on different platforms. You will not require all of your acquisitions to rewrite all of their software into your monolith.
With extra work, you can solve for many of these problems within a monolithic architecture, but those solutions will typically introduce similar complexities as microservices (e.g. talking to many datastores, composing your monolith of many coordinating processes, configuring independent nodes of your monolith differently, provisioning independent nodes appropriately, etc).
My experience in software is that we draw false dichotomies between approaches and the reality is that they will tend to converge when you put in the effort to consider and address the shortcomings of each approach.
- dagss 4y agoI think I should have avoided the word "monolith". I just meant non-microservice architectures. Microservices have their own challenges apart from network communication etc between medium sized services that yiu refer to. For instance lack of easily available consistency, sometimes needing to basically implement multi-service transactions (see SAGA pattern) and so on... if services are a bit larger, such problems occur much more seldom.
- foobazgt 4y agoStorage in general, and transactional boundaries in particular, are one of the biggest banes of distributed computing. It's still more art than science to determine where and how you slice an entity graph across datastores and services. Sadly, these decisions also bleed through API.