gliderlabs/connectable là một trong những repo mã nguồn mở mà TopGit theo dõi, hiện có 463 sao, viết chủ yếu bằng Go. Magic proxy for internal services
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
A smart Docker proxy that lets your containers connect to other containers via service
discovery without being service discovery aware.
Getting Connectable
You can get the Connectable micro container from the Docker Hub.
$ docker pull gliderlabs/connectable
Using Connectable
Basic overview is:
Run a service registry like Consul, perhaps with Registrator
Start a Connectable container on each host
Expose Connectable to your containers, using links or Resolvable (experimental)
Run containers with labels defining what they need to connect to with what ports
Have software in those containers connect via those ports on localhost
Starting Connectable
Once you have a service registry set up, you point Connectable to it when you launch it.
You also need to mount the Docker socket. Here is an example using the local Consul agent, assuming you're running Resolvable:
Connectable acts as a load balancer across instance of services it finds. It shuffles them randomly on new connections. Although this seems less predictable, it ensures even balancing cluster-wide.
Connectable is a reverse proxy and balancer, but it is not recommended to be used as your public facing balancer. Instead, use a more configurable balancer like haproxy or Nginx. Use Connectable for internal service-to-service connections. For example, you could use Connectable with Nginx to simplify your Nginx container setup.
Health Checking
Currently Connectable does not have native health checking integration. For now, Connectable defers to the registry to return healthy services. For example, this is how Consul DNS works. Otherwise, when Connectable tries to connect to an endpoint and is unable to connect, it will try the next one transparently until all services have been tried. This covers some but not all "unhealthy" service cases.
Future modules may add support for integration with health checking mechanisms.
Overhead
Like all proxies, you incur overhead to your connections. Connectable is roughly comparable but slightly slower than Nginx. Not by much. Here is some data collected using HTTP requests via ApacheBench using -n 200 -c 20:
nginx:
Requests per second: 754.53 [#/sec] (mean)
Time per request: 26.507 [ms] (mean)
Time per request: 1.325 [ms] (mean, across all concurrent requests)
connectable:
Requests per second: 606.32 [#/sec] (mean)
Time per request: 32.986 [ms] (mean)
Time per request: 1.649 [ms] (mean, across all concurrent requests)
Memory overhead is also roughly comparable per connection. Added network latency is near zero since it's running on the same host as clients. Keep in mind, Connectable is designed to run on each host for best performance and to avoid SPOF.
Although Connectable is Good Enough for most cases, if the overhead is a deal breaker for a particular case, don't use it in that particular case. Alternatives include working with service registries directly, just using DNS discovery with known ports, setting up a full SDN, etc.
Modules
Todo
Why not just DNS?
If you're using Consul DNS, SkyDNS, et al, you may wonder why Connectable is necessary. The answer is ports. Most software is not designed for dynamic ports. Most software can only resolve hostnames to IPs. You have to hard configure the port used.
If you are able to run all containers publishing exposed ports on known ports (-p 80:80), you might not need Connectable. If you have a fancy SDN solution that makes private container IPs publicly addressable and they use known ports, you don't need Connectable.
However, if you run containers with non-conventional ports, or don't have control over published ports, or just want to not care and wish it were magically taken care of ... that's what Connectable is for.
Connectable when combined with Registrator lets you run containers with -P and not care about what port they publish as.
Also, DNS may not randomize results, effectively balancing services. Connectable ensures internal load balancing.
Connectable is sponsored by Weave. The original ambassadord proof of concept was made possible thanks to DigitalOcean. Also thanks to Jérôme Petazzoni for helping with the iptables bits that make this magical.
gliderlabs/connectable có 463 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/gliderlabs/connectable. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
gliderlabs/connectable có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho gliderlabs/connectable. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
gliderlabs/connectable còn đang phát triển không?
Commit gần nhất trên gliderlabs/connectable là 10.5 năm trước (theo timestamp GitHub). Repo có 38 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
gliderlabs/connectable là gì?
gliderlabs/connectable (gliderlabs/connectable) là dự án Go trên GitHub. Theo mô tả gốc: Magic proxy for internal services
gliderlabs/connectable viết bằng ngôn ngữ gì?
gliderlabs/connectable chủ yếu viết bằng Go. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về connectable?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về connectable.