Microservices and database joins

  • When performance or latency doesn’t matter too much (yes, we don’t
    always need them) it’s perfectly fine to just use simple RESTful APIs
    for querying additional data you need. If you need to do multiple
    calls to different microservices and return one result you can use
    API Gateway pattern.

  • It’s perfectly fine to have redundancy in Polyglot persistence environments. For example, you can use messaging queue for your microservices and send “update” events every time you change something. Other microservices will listen to required events and save data locally. So instead of querying you keep all required data in appropriate storage for specific microservice.

  • Also, don’t forget about caching 🙂 You can use tools like Redis or Memcached to avoid querying other databases too often.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)