web services - Databases in a microservices pattern/architecture -


i'm trying understand layout of microservices pattern. given each microservice run on over vm (for sake of example) how database fit architecture?

would each service, in turn, connect consolidated database read/write data?

thanks insight

there's no 1 size fits solution.

the general principle each microservice should make right decision in terms of right persistence architecture should be. might connected central sql database, or using filesystem, or using nosql data store, or memcached, or whatever. (this why people talk eventual consistency lot microservices.)

you want way capture benefits of microservices.

  1. you want each microservice independently shippable, you're not blocked on anything. stronger coupling centralized infrastructure reduces independence of microservice.
  2. persistence requirements highly variable. if you're running search microservice, don't need acid semantics of typical sql database. if you're doing payments, need acid. if you're storing , processing images, might use filesystem. etc.

Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -