Service Discovery

Kitex provides extensions for service registration and discovery, and already supports many popular registries.

Kitex has completed ETCD, ZooKeeper, Eureka, Consul, Nacos, Polaris multiple service discovery component through the support of community developers. Of course, it also supports DNS resolution and Static IP direct access mode. A strong and complete community ecology has been established for users to choose flexibly according to their needs.

For example, DNS Resolver is suitable for the clusters where DNS is used as a service discovery, commonly used for Kubernetes clusters.

More service discovery components in extended repository: registry-etcdregistry-nacosregistry-zookeeperpolarisregistry-eurekaregistry-consulregistry-servicecomb .

Usage

In the case of DNS Resolver

import (
    ...
    dns "github.com/kitex-contrib/resolver-dns"
    "github.com/cloudwego/kitex/client"
    ...

)

func main() {
    ...
    client, err := echo.NewClient("echo", client.WithResolver(dns.NewDNSResolver()))
	if err != nil {
		log.Fatal(err)
	}
    ...
}

Last modified July 3, 2023 : Update _index.md (f1d978d)