Go to file
Dan Upton 118ffb1e95
grpc: fix data race in balancer registration (#16229)
Registering gRPC balancers is thread-unsafe because they are stored in a
global map variable that is accessed without holding a lock. Therefore,
it's expected that balancers are registered _once_ at the beginning of
your program (e.g. in a package `init` function) and certainly not after
you've started dialing connections, etc.

> NOTE: this function must only be called during initialization time
> (i.e. in an init() function), and is not thread-safe.

While this is fine for us in production, it's challenging for tests that
spin up multiple agents in-memory. We currently register a balancer per-
agent which holds agent-specific state that cannot safely be shared.

This commit introduces our own registry that _is_ thread-safe, and
implements the Builder interface such that we can call gRPC's `Register`
method once, on start-up. It uses the same pattern as our resolver
registry where we use the dial target's host (aka "authority"), which is
unique per-agent, to determine which builder to use.
2023-02-28 10:18:38 +00:00
.changelog UI: Fix rendering issue in search and lists (#16444) 2023-02-27 16:31:47 -07:00
.circleci
.github chore: remove stable-website (#16386) 2023-02-23 10:39:15 -05:00
.release add back staging bits (#16411) 2023-02-23 19:39:40 -06:00
acl
agent grpc: fix data race in balancer registration (#16229) 2023-02-28 10:18:38 +00:00
api add missing field to oss struct (#16401) 2023-02-23 19:06:09 +00:00
bench
build-support
command Fix a couple inconsistencies in `operator usage instances` command (#16260) 2023-02-24 17:51:09 +00:00
connect
contributing
docs
envoyextensions
grafana
internal
ipaddr
lib
logging
proto [API Gateway] Various fixes for Config Entry fields (#16347) 2023-02-22 04:02:04 +00:00
proto-public
sdk
sentinel
service_os
snapshot
test upgrade test: consolidate resolver test cases (#16443) 2023-02-27 20:38:31 +00:00
testrpc
tlsutil
tools/internal-grpc-proxy
troubleshoot
types
ui UI: Fix rendering issue in search and lists (#16444) 2023-02-27 16:31:47 -07:00
version
website Update ingress-gateways.mdx (#16330) 2023-02-27 18:43:12 -08:00
.dockerignore
.gitattributes
.gitignore
.golangci.yml
CHANGELOG.md update changelog (#16426) 2023-02-24 15:29:07 -08:00
Dockerfile Upgrade Alpine image to 3.17 (#16358) 2023-02-22 10:09:41 -06:00
GNUmakefile
LICENSE
NOTICE.md
README.md
buf.work.yaml
fixup_acl_move.sh
go.mod
go.sum
main.go

README.md

Consul logo Consul

Docker Pulls Go Report Card

Consul is a distributed, highly available, and data center aware solution to connect and configure applications across dynamic, distributed infrastructure.

Consul provides several key features:

  • Multi-Datacenter - Consul is built to be datacenter aware, and can support any number of regions without complex configuration.

  • Service Mesh - Consul Service Mesh enables secure service-to-service communication with automatic TLS encryption and identity-based authorization. Applications can use sidecar proxies in a service mesh configuration to establish TLS connections for inbound and outbound connections with Transparent Proxy.

  • Service Discovery - Consul makes it simple for services to register themselves and to discover other services via a DNS or HTTP interface. External services such as SaaS providers can be registered as well.

  • Health Checking - Health Checking enables Consul to quickly alert operators about any issues in a cluster. The integration with service discovery prevents routing traffic to unhealthy hosts and enables service level circuit breakers.

  • Key/Value Storage - A flexible key/value store enables storing dynamic configuration, feature flagging, coordination, leader election and more. The simple HTTP API makes it easy to use anywhere.

Consul runs on Linux, macOS, FreeBSD, Solaris, and Windows and includes an optional browser based UI. A commercial version called Consul Enterprise is also available.

Please note: We take Consul's security and our users' trust very seriously. If you believe you have found a security issue in Consul, please responsibly disclose by contacting us at security@hashicorp.com.

Quick Start

A few quick start guides are available on the Consul website:

Documentation

Full, comprehensive documentation is available on the Consul website: https://consul.io/docs

Contributing

Thank you for your interest in contributing! Please refer to CONTRIBUTING.md for guidance. For contributions specifically to the browser based UI, please refer to the UI's README.md for guidance.