#
Gobetween
이 페이지에서는 Gobetween에 대해서 다루고 있습니다.
#
What is Gobetween
?
Gobetween
은 Go로 개발된 Load Balancer 입니다.
#
Prerequisites
- Docker is installed using either
docker compose
.
#
How-to
- Protocols
- TCP
- TLS
- UDP
- Balancing
- Discovery
- static
- srv
- docker
- json
- plaintext
- exec
- consul
- lxd
- Healthchecks
- ping
- exec
- probe
- Access-Control
- Proxy-Protocol
- Tls-Proxying
- Server-Name-Indication
- etc..
#
Install
version: '3.3'
services:
gobetween:
image: yyyar/gobetween
container_name: gobetween
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./gobetween_data/config.toml:/etc/gobetween/conf/gobetween.toml
하단의 예제는 80, 443 포트에 대해 Load Balancer 설정된 파일입니다.
[servers.https]
bind = ":443"
protocol = "tcp"
balance = "weight"
max_connections = 1000
client_idle_timeout = "10m"
backend_idle_timeout = "10m"
backend_connection_timeout = "2s"
[servers.https.discovery]
kind = "static"
static_list = [
"192.168.0.130:443 weight=1"
"192.168.0.131:443 weight=1"
]
[servers.http]
bind = ":80"
protocol = "tcp"
balance = "weight"
max_connections = 1000
client_idle_timeout = "10m"
backend_idle_timeout = "10m"
backend_connection_timeout = "2s"
[servers.http.discovery]
kind = "static"
static_list = [
"192.168.0.130:80 weight=1"
"192.168.0.131:80 weight=1"
]
That's it! 🎉
#
memo
변경사항(업데이트)가 있을 시, 안내 없이 변경 될 수 있습니다.