Built-In Proxy Options

    Consul comes with a built-in L4 proxy for testing and development with Consul Connect service mesh.

    Below is a complete example of all the configuration options available for the built-in proxy.

    1. "service": {
    2. ...
    3. "connect": {
    4. "proxy": {
    5. "config": {
    6. "bind_address": "0.0.0.0",
    7. "bind_port": 20000,
    8. "local_connect_timeout_ms": 1000,
    9. "upstreams": [...]
    10. },
    11. "upstreams": [
    12. {
    13. ...
    14. "config": {
    15. "connect_timeout_ms": 1000
    16. }
    17. }
    18. }
    19. }
    20. }
    • bind_address - The address the proxy will bind its public mTLS listener to. It defaults to the same address the agent binds to.

    • - The port the proxy will bind its public mTLS listener to. If not provided, the agent will assign a random port from its configured proxy port range specified by sidecar_min_port and .

    • local_connect_timeout_ms - The number of milliseconds the proxy will wait to establish a connection to the local application before giving up. Defaults to 1000 or 1 second.

    • - The number of milliseconds the proxy will wait for incoming mTLS connections to complete the TLS handshake. Defaults to 10000 or 10 seconds.

    Proxy Upstream Config Key Reference

    All fields are optional with a reasonable default.

    • - The number of milliseconds the proxy will wait to establish a TLS connection to the discovered upstream instance before giving up. Defaults to 10000 or 10 seconds.