O'Reilly logo

TypeScript Microservices by Parth Ghiya

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Postulate 2 – replicate the database for speed and robustness 

The second factor at play when selecting where a piece of data should be stored in a microservice system is decided based on the scope or locality. There's a big change if the data store is in the vicinity of a microservice or far off, even though we are talking about the same data. A microservice can query its own database for data or a microservice can query another microservice for that same data. The latter, of course, will come with cons and tight dependencies. Looking in the local neighborhood is much faster than looking at different cities. Once you have decided on the scope of the data, you will realize that microservices need to talk to one another very often.

This kind ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required