Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

consul/connect: set default Envoy worker threads for gateways #9611

Merged
merged 1 commit into from
Dec 10, 2020

Conversation

shoenig
Copy link
Member

@shoenig shoenig commented Dec 10, 2020

Applying the default --concurrency for gateways was missed before.
Set the default Envoy concurrency to 1 for connect gateways. The
same override value meta.connect.proxy_concurrency applies.

Applying the default --concurrency for gateways was missed before.
Set the default Envoy concurrency to 1 for connect gateways. The
same override value meta.connect.proxy_concurrency applies.
@shoenig
Copy link
Member Author

shoenig commented Dec 10, 2020

spot check

gateway demo job

job "igfull" {
  
  datacenters = ["dc1"]

  group "example" {
    
    network {
      mode = "host"

      port "inbound" {
	static = 8080
      }

      port "envoy" {
	static = 19999
      }
    }

    service {
      name = "my-ingress-service"
      port = "envoy"

      connect {
	gateway {

	  // Consul gateway [envoy] proxy options.
	  proxy {
	    connect_timeout = "500ms"
	    envoy_gateway_bind_tagged_addresses = false
	  }

	  // Consul Ingress Gateway Configuration Entry
	  ingress {
	    tls {
	      enabled = false
	    }

	    // any number of listeners
	    listener {
	      port = 8080
	      protocol = "tcp"
	      // protocol = "http"
	      service {
		name = "uuid-api"
		// hosts = ["192.168.99.78"]
	      }
	    }
	  }
	}
      }
    }
  }

  group "generator" {
    network {
      mode = "bridge"
      port "api" {
	// nomads choice
	to = -1
      }
    }

    service {
      name = "uuid-api"
      port = "${NOMAD_PORT_api}"

      connect {
	native = true
      }
    }

    task "generate" {
      driver = "docker"

      config {
	image = "hashicorpnomad/uuid-api:v3"
      }

      env {
	BIND = "0.0.0.0"
	PORT = "${NOMAD_PORT_api}"
      }
    }
  }
}

using defaults

$ sudo nomad agent -dev
$ docker inspect 263 | jq .[].Args
[
  "-c",
  "/secrets/envoy_bootstrap.json",
  "-l",
  "info",
  "--concurrency",
  "1",
  "--disable-hot-restart"
]

using configured value

sudo nomad agent -dev -meta='connect.proxy_concurrency=3'
$ docker inspect 7b | jq .[].Args
[
  "-c",
  "/secrets/envoy_bootstrap.json",
  "-l",
  "info",
  "--concurrency",
  "3",
  "--disable-hot-restart"
]

Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shoenig shoenig merged commit 6fe1df1 into master Dec 10, 2020
@shoenig shoenig deleted the b-gateway-concurrency branch December 10, 2020 18:44
schmichael pushed a commit that referenced this pull request Dec 16, 2020
consul/connect: set default Envoy worker threads for gateways
shoenig added a commit that referenced this pull request Dec 16, 2020
backspace pushed a commit that referenced this pull request Jan 22, 2021
@github-actions
Copy link

github-actions bot commented Dec 6, 2022

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 6, 2022
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants