-3

This is a question that I have been thinking about and yet I can't seem to find the answer or am I overthinking things too much :-

If a Microservice AccountService in a Java Spring Boot application equals one instance of this service, and there is one RESTful API getAccount, then if I have another API to add, deleteAccount, should I actually be creating another microservice DeleteAccountService, which results in two Spring Boot applications?

OR should I just add another REST API to the AccountService?

I guess the confusion is that I had thought the use of Microservices mean they could easily be isolated and thus maintenance of them meant it was quick to deploy rather than deploy everything?

Would love some feedback on this

thanks

  • 1
    A microservice is not limited to a single method or a single uri. You have not presented a reason you should pay the cost to separate these two capabilities. Don't overthink it. – joshp Feb 9 at 17:35
  • Think in MS as boundaries or scopes. Business boundaries/scopes. If managing accounts is a boundary for you, make sense having a service providing with an API for a full accounts management, which is likely to include operations like load, create, remove, update accounts. Among many others. – Laiv Feb 9 at 18:35

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.