Central service registry to enable service discovery in microservices architecture with Django & PostgreSQL

Sandhya Balakrishnan (~sandhya73)


Description:

End to end process of registering services to a central place and reaching out to a target service using service registry is service discovery. This is pretty much like using DNS for finding IP address of a site and then reaching that site using the IP address.

Our entire architecture is split into multiple microservices which makes deployments easier, highly scalable and has better code quality. Key part of microservices architecture is inter communication amongst the microservices. We have architected in such a way that, the entire system is configurable according to the needs of a particular client per product/microservice. This demanded a central registry where all configurations of the microservices had to be in one place which is highly available.

Hence, we designed and implemented a central service registry with Django, PostgreSQL and AWS Lambda. Any microservice will have to register itself in the system, define its own configs, subscribe to the notifications and communicate to other microservices using this registry. A wrapper library is also available for all microservices to use its features to avoid code being rewritten.

Key points in developing our own service registry :

  • It is a critical infrastructure component that must be setup, configured and managed with 99.9% uptime
  • Although respective microservices would cache the data provided by the service registry, if the service registry fails that data will eventually become out of date. Hence, it must be highly available
  • Health checks should be enabled to verify the subscriptions

Basic outline of the talk:

  • What is the concept of service discovery and registry and real time use cases?

  • Our use case, implementation & architecture

  • But why did we go for Django, PostgreSQL & AWS Lambda?

  • Clients, Regions, Apps & Product configs!!

  • How did we handle notifications?

  • Is it developer environment friendly? Oh, Yes!

  • wrapper library on top of it!

Who is this talk for?

  • Django, PostgreSQL & AWS Lambda users

  • Curious folks who want to know how to deal with inter microservice communication

Prerequisites:

Content URLs:

Slides

Speaker Info:

Sandhya is the Head of Product Delivery at Mad Street Den.

Speaker Links:

LinkedIn

Twitter

Id: 1394
Section: Web development
Type: Talks
Target Audience: Advanced
Last Updated: