Service Mesh and Discovery
Koyeb provides a built-in Service discovery mechanism to easily connect to other internal Services of your application. This is coupled with a Service mesh to ensure all inter-Service communication is encrypted.
Service mesh
Services deployed in a Koyeb Organization can communicate with each other using a private mesh network. You can use both IPv4 and IPv6 to interact with your resources inside the mesh. The mesh network is available within the regions used by your Service.
No configuration is needed to benefit from the service mesh. To access the service mesh, use the provided private domain that uses the <SERVICE_NAME>.<APP_NAME> format.
Default per Service type
A Service is included or excluded from the mesh by default based on its type. If it is excluded from the mesh, it won’t receive a private domain and can’t communicate with your other resources inside the mesh.
The following table outlines the default value of the mesh field by Service type, along with customization options:
| Service type | Default | Customizable |
|---|---|---|
| Web Service | Included in the mesh | Yes |
| Worker | Included in the mesh | Yes |
| Sandbox | Excluded from the mesh | Yes |
Free Instances are always excluded from the mesh network.
Service discovery
Each Service you deploy in a Koyeb App comes with a unique private domain name based on the Service name. This allows you to easily communicate with other internal Services using a predictable naming system.
The following table shows how to reach a Service within a Koyeb App:
| name | status | details |
|---|---|---|
<SERVICE_NAME> | available | Reach a Service Instance across all regions. |
<SERVICE_NAME>.<APP_NAME>.internal | available | Reach a Service Instance within the same region. |
<REGION_NAME>.<SERVICE_NAME>.<APP_NAME>.internal | coming soon | Reach an Instance of the Service in a specific region. |