Listeners and Rules
When you create a Connector, you define listeners that specify how clients connect to it.Listeners
A listener monitors a specific port for incoming client connections. You can define multiple listeners on different ports for different use cases.Port 8080 is reserved for the Connector’s health check endpoint and cannot be
used for listeners.
Listener Rules
Each listener uses routing rules to determine where to forward requests. There are three types of rules:Resource Rule
Resource Rule
Routes all connections to a specific resource.Example: All traffic on port 5432 goes to the
production-postgres database.Technology Rule
Technology Rule
Routes connections to all resources of a specific technology (e.g., all
PostgreSQL databases). When multiple resources match, smart
routing
automatically selects the correct resource based on the connection string.
Any Rule
Any Rule
Routes to any resource using deep packet inspection to detect the protocol automatically.Supported protocols: PostgreSQL, MongoDB, HTTP, S3, SSH, Kubernetes.This is the most flexible option but requires the Connector to inspect traffic to determine routing.
Terraform Example
The following example demonstrates how to deploy a Connector linked to all PostgreSQL resources:- A Connector named
main - A listener on the specified port for PostgreSQL connections
- A technology rule that routes all PostgreSQL traffic to any PostgreSQL resource in your organization