I'm practising for the High Level Design Interview for a SDE 3-4.
I did this design for UberEats and I had some questions.
The functional requirements are:
And the Non Functional are:
I put a picture of my design below.
My questions are:
I have to specify which type of communication is between the microservices?
This is a good level of detail or I have to go more deeper?
The notification service part, I don't know if it's correct I was thinking about a messageQueue and the OMS (Ordering Management System) will take care of putting order updates to the message queue.
I did some research but I'm pretty lost in this type of designs so all the help is welcome.
General Comments on Your Diagram vs HLD
Always think about the audience - what do they need to know? And your message - what are you wanting to convey. Thinking about this will help you tune both the information you include, and how you present it.
Does the HLD demonstrate answers to the questions being asked?
The data schema looks ok for an HLD, but adding relationships (connector lines) might be useful. If it becomes too complicated (too many connections) it might not be feasible to include it on the same page as everything else.
One gap you might have is (API) "[Resources][2]" ([more about them here][1]). API's especially REST-based APIs should deal with resources. You have called out a data schema (how the data is stored). The resource model need not be complex.
(Do) I have to specify which type of communication is between the microservices?
Refer to my #2 above. The short answer is probably "yes", in terms of the HLD as a whole, but not necessarily in the context of one diagram.
If you have a lot of microservices, and especially if the relationships between them is non-trivial, then you might have two diagrams: one showing all the microservices and how they relate, a second showing the different communication types.
Typically communication between microservices should be relatively consistent - so you should be able to do this by dealing with communication between types of microservice, as well as any special cases if they exist.
The second "diagram" could also be a table/matrix that lists the microservices and key info about them, e.g: external-facing y/n, type (service, orchestration, etc), which business domain it sits in, etc.
This is a good level of detail or I have to go deeper?
I can't speak to the Amazon expectations, but in general terms the level of detail is good - you probably wouldn't want to go deeper.
Your main diagram is doing two things - some elements are described with a functional (e.g. "Rider App"), some purely technical (e.g. "Messaging queue"), most with both. I prefer the latter, just try to be as consistent as you can.
For More Details [1]: https://www.thoughtworks.com/insights/blog/rest-api-design-resource-modeling [2]: https://cloud.google.com/apis/design/resources