Search code examples
kubernetesmicroservicesdapr

Dapr service discovery


We are evaluating Dapr for our microservice framework. We will be using Kubernetes. One of the advertised selling points for Dapr is service invocation and service discovery. Doesn't K8s already offer service discovery out of the box?


Solution

  • Short answer: Yes (Kubernetes offers Service Discovery)

    While there may be several patterns (and tools being the implementation of these patterns) for Service Discovery, Kubernetes offers service discovery at its core through the Service objects avoiding any needs of using a particular technology or tool to achieve a basic Container-Managed runtime environment.

    You can read more on Kubernetes Services in the official documentation.

    It is worth noting that dapr is a platform agnostic portable runtime that does not depend on Kubernetes and its core Service Discovery feature.

    It offers more features than simply discovering your services (it has been usually compared to Service Meshes tools as the tend to look out being the same):

    • It offers transparent and secured service-to-service calls
    • It allows Publish-Subscribe communication style
    • It offers a way to register triggers and resource bindings (allowing for function-as-a-service development style)
    • It offers observability out-of-the-box
    • ...