r/cloudcomputing • u/difftool • Aug 27 '23
Composition vs Aggregation design pattern w.r.t. to microservices?
Can someone please help me understand the difference between these two? Whatever I have read makes them sound exactly the same! Can you please provide an example to understand the difference?
TIA!!
5
Upvotes
View all comments
Show parent comment
1
u/difftool Aug 28 '23
Thank you for explaining it in detail! Really appreciate it.
I understood the difference, however, let's say I add an API gateway. How does it change the dynamics now? Wouldn't the API gateway take care of both composition and aggregation now making the client feel it's the same thing?