Announcing DNS Service Discovery for Heroku Private Spaces: Microservices Communication, Made Easy

Today, we are excited to announce DNS Service Discovery for Heroku Private Spaces, an easy way to find and coordinate services for microservice-style deployments.

As applications grow in sophistication and scale, developers often organize their applications into small, purpose-built “microservices”. These microservice systems act in unison to achieve what otherwise would be handled by a single, larger monolithic application, which serves the benefit of simplifying applications’ codebases and improving their overall reliability.

DNS Service Discovery is a valuable component of a true microservices architecture. It is a simple, yet effective way to facilitate microservice-style application architecture on Private Spaces using standard DNS naming conventions. As a result, your applications can now know in advance how they should reach the other process types and services needed to do their job.

How It Works

dns-discovery-blog

DNS Service Discovery allows you to connect these services together by providing a naming scheme for finding individual dynos within your Private Space. Every process type for every application in the Space is configured to respond to a standard DNS name of the format <process-type>.<application-name>.app.localspace.

Example:

$ nslookup web.myapp.app.localspace
web.myapp.app.localspace. 0 IN A 10.10.10.11
web.myapp.app.localspace. 0 IN A 10.10.10.10
web.myapp.app.localspace. 0 IN A 10.10.10.9

This is enabled by default on all newly created applications in Private Spaces. For existing Private Spaces applications, you need to run:

$ heroku features:enable spaces-dns-discovery --app <app name>

When combined with Heroku Flow’s continuous delivery approach, the benefits of a microservices architecture are further realized. For example, in a distributed system, each application can have a smaller footprint and a more focused purpose - so when it comes time to push updates to this system, your team can modify and continuously deliver a single portion of your architecture, instead of having to cycle out the entirety of your application. And when your application’s traffic grows, you can scale up the just the portion of your system that requires extra cycles, resulting in a more flexible and economical use of resources.

Learn More

We’re excited to see the new possibilities Service Discovery opens up for microservices architectures. If you are interested in learning more about DNS Service Discovery for your applications in Private Spaces, please check out our Dev Center article or contact us with further questions.

More from the author

Browse the archives for news or all blogs Subscribe to the RSS feed for news or all blogs.