REST Service Registry Pattern in AKS and ASF

1/6/2019

What's the built-in way for Micro-service Service Registry and Service Discovery in Azure Kubernetes and Azure Service Fabric? I got reference to below service registries.

  1. Apache Zookeeper
  2. Consul
  3. Etcd

Are they compatible to use in Azure environment? Any leads here for dynamically discover container based Micro-services deployed in AKS and ASF, under a single node? Azure API Management https calls may not be a best option for inter service communication inside a single node, it may be good option for external clients though

-- Jaish Mathews
azure
azure-kubernetes
azure-service-fabric
microservices

2 Answers

1/6/2019
  1. AKS is just a hosted kubernetes, kubernetes has no built-in service discovery (on the same node). SF has got naming service, which isnt exactly service discovery, but is similar to DNS service in kubernetes
  2. The services you mentioned above can be used with AKS
  3. I dont think either one have anything built-in to discover services on the same node
-- 4c74356b41
Source: StackOverflow

1/7/2019

You should not try to reinvent the wheel, unless there are some specific features in these products that you want but didn't disclose in your original answer.

Kubernetes and Service Fabric, both provides a simple and useful feature for service discovery, called DNS Service.

Whenever new services are created, they are registered in the DNS with their addresses, when an application running on the cluster tries to resolve a DNS for a particular service domain name, it query the DNS and get the IP of the service without you requiring to type any additional logic other than the out of the box provided by most languages.

Service Fabric, also provides two other features for service discovery if for example you need to resolve stateful services and need get a specific partition:

  • Reverse Proxy: Provides an URL for accessing services without knowing their location, the service will connecto to the proxy that will resolve the service address for you.
  • Service-to-Service Communication via Service Remoting: Via code you can resolve the service location using the ServiceProxy.

Kubernetes on the other hand, does not provide baked features the same way, because it is more flexible to chose your own solution, in this case, there are plenty of solutions out there. One I can guide you to is Istio

-- Diego Mendes
Source: StackOverflow