Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions examples/tcp.proxy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# tcp.proxy

Listens on tcp port `12345` and will proxy iperf traffic to iperf server.

## Requirements

- docker compose

## Setup

To `start` the Docker Compose stack defined in the [compose.yaml](compose.yaml) file, use:

```bash
docker compose up -d
```

## Teardown

To remove any resources created by the Docker Compose stack, use:

```bash
docker compose down
```
35 changes: 35 additions & 0 deletions examples/tcp.proxy/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: ${NAMESPACE:-zilla-tcp-proxy}
services:
iperf-server:
image: networkstatic/iperf3
container_name: iperf-server
command: -s
ports:
- "5201:5201"

zilla:
image: ghcr.io/aklivity/zilla::${ZILLA_VERSION:-latest}
restart: unless-stopped
hostname: zilla.examples.dev
ports:
- "12345:12345"
volumes:
- ./etc:/etc/zilla
command: start -v -e -Pzilla.engine.maximum.messages.per.read=10
healthcheck:
interval: 5s
timeout: 3s
retries: 5
test: ["CMD", "bash", "-c", "echo -n '' > /dev/tcp/127.0.0.1/12345"]
depends_on:
- iperf-server

iperf-client:
image: networkstatic/iperf3
container_name: iperf-client
entrypoint: >
sh -c "sleep 10 &&
iperf3 -c zilla.examples.dev -p 12345 -P 50 -t 20"
networks:
default:
driver: bridge
20 changes: 20 additions & 0 deletions examples/tcp.proxy/etc/zilla.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: example
bindings:
north_tcp_server:
type: tcp
kind: server
options:
host: 0.0.0.0
port: 12345
exit: south_tcp_client
south_tcp_client:
type: tcp
kind: client
options:
host: iperf-server
port: 5201
telemetry:
exporters:
stdout_logs_exporter:
type: stdout
Loading