Oh no, you're thinking, yet another cookie pop-up. Well, sorry, it's the law. We measure how many people read us, and ensure you see relevant ads, by storing cookies on your device. If you're cool with that, hit “Accept all Cookies”. For more info and to customize your settings, hit “Customize Settings”.

Review and manage your consent

Here's an overview of our use of cookies, similar technologies and how to manage them. You can also change your choices at any time, by hitting the “Your Consent Options” link on the site's footer.

Manage Cookie Preferences
  • These cookies are strictly necessary so that you can navigate the site as normal and use all features. Without these cookies we cannot provide you with the service that you expect.

  • These cookies are used to make advertising messages more relevant to you. They perform functions like preventing the same ad from continuously reappearing, ensuring that ads are properly displayed for advertisers, and in some cases selecting advertisements that are based on your interests.

  • These cookies collect information in aggregate form to help us understand how our websites are being used. They allow us to count visits and traffic sources so that we can measure and improve the performance of our sites. If people say no to these cookies, we do not know how many people have visited and we cannot monitor performance.

See also our Cookie policy and Privacy policy.

This article is more than 1 year old

Who you gonna call? Google Cloud Platform's beta Service Directory is like a phone book for microservice discovery

Playing catch-up with AWS and not that smart, but some advantages over DNS

Google Cloud Platform's Service Directory, which aims to enhance microservice discovery, has hit beta.

Businesses may have thousands of services running (just ask Monzo, for example) and applications must be able to find and call the endpoints of these services. This discovery role is traditionally performed by DNS, but Google reckons DNS has limitations.

"DNS resolvers can be unreliable in terms of respecting TTLs and caching, cannot handle larger record sizes, and do not offer an easy way to serve metadata to users," Google's docs explain.

Service Directory is a custom directory designed for service lookup. At first glance it is depressingly manual. You create a service by entering a name and endpoint (IP number and port). Each endpoint can also have metadata added, in the form of one more name/value pairs of your own choosing. Metadata can include URLs.

All very simple, and the endpoints do not need to be on GCP but could be on-premises or anywhere on the internet. Service Directory is organised by namespace and GCP region.

Service Directory is an alternative to DNS resolving endpoints

Service Directory is an alternative to DNS for resolving service endpoints

However, the key is that the service has an REST-based API for resolving, creating, deleting and updating service records, subject to permissions. There is also an option to configure a DNS zone to allow queries via DNS, though it looks like you cannot access the metadata this way. Everything can therefore be automated, with services registering and updating their entries in Service Directory and clients using either DNS or the API to retrieve endpoints. All requests to the directory are logged.

Diagram showing how clients might use Service Directory

Diagram showing how clients might use Service Directory

Note that Service Directory is inherently no smarter than DNS. It does not check service health, nor does it know whether the endpoint for a service is actually reachable by a client.

You can roll your own system, though. Google suggests using metadata to record when a service is registered or updated, as well occasionally updating metadata for system health. You could write an application, for example, which checked the health of all the services in the directory and tagged them accordingly.

AWS has a similar service called Cloud Map.

GCP Service Directory is free while in beta and no pricing has yet been detailed. ®

 

Similar topics

TIP US OFF

Send us news


Other stories you might like