4 ms·
How big or small are your micro-services ? how many do you have ? How do you draw the boundaries ?
by corpMaverick 9y ago
How big or small are your micro-services ? how many do you have ? How do you draw the boundaries ?
- ChicagoDave 9y agoI can only refer you to Eric Evans book (https://www.amazon.com/Domain-Driven-Design-Tackling-Complexity-Software/dp/0321125215 https://www.amazon.com/Domain-Driven-Design-Tackling-Complex...) and other domain driven design material. Boundaries are by domain, and yes that's not a simple thing to define. Sometimes, domains have varying interfaces, which makes building micro-services more complex, especially when trying to adhere to REST/Swagger standards (something I'm not overly find of). But keeping things as simple as possible is really the best approach. All micro-services should be small. When I see someone say "big", then I'm guessing there are a lot of ad-hoc actions...those need to be broken down into their proper domain or relegated to a query service.
- ChicagoDave 9y agoI wanted to add that building micro-services requires a bullet-proof security strategy, usually something like OAuth2. Using authentication, users of an API can have "claims" that will help a micro-service delineate access and provide a way to design for varying interfaces. This still leaves the Swagger standards in direct opposition to building a set of variant end points since it _requires_ that end points be singular (you can't have a GET api/foo/{id} and a GET api/bar/{id} on the same API without a lot of fudging. This is a distraction from building enterprise-level API's and leans far too much toward single-purpose API's.