feat(realtime): Realtime streams v2 (#2632)
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
# nginx.conf (relevant bits)
|
||||
events {}
|
||||
|
||||
http {
|
||||
# This now governs idle close for HTTP/2, since http2_idle_timeout is obsolete.
|
||||
keepalive_timeout 75s; # ← set to 60–80s to reproduce your prod-ish drop
|
||||
|
||||
# Good defaults for streaming
|
||||
sendfile off; # avoid sendfile delays for tiny frames
|
||||
tcp_nodelay on;
|
||||
|
||||
upstream app_upstream {
|
||||
server host.docker.internal:3030;
|
||||
keepalive 16;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 8443 ssl; # ← no ‘http2’ here…
|
||||
http2 on; # ← …use the standalone directive instead
|
||||
server_name localhost;
|
||||
|
||||
ssl_certificate /etc/nginx/certs/cert.pem;
|
||||
ssl_certificate_key /etc/nginx/certs/key.pem;
|
||||
|
||||
location / {
|
||||
# Make SSE actually stream through NGINX:
|
||||
proxy_buffering off; # don’t buffer
|
||||
gzip off; # don’t compress
|
||||
add_header X-Accel-Buffering no; # belt & suspenders for NGINX buffering
|
||||
proxy_set_header Accept-Encoding ""; # stop upstream gzip (SSE + gzip = sad)
|
||||
|
||||
# Plain h1 to upstream is fine for SSE
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
|
||||
proxy_read_timeout 30s;
|
||||
proxy_send_timeout 30s;
|
||||
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
|
||||
proxy_pass http://app_upstream;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
[
|
||||
{
|
||||
"name": "trigger_webapp_local",
|
||||
"listen": "[::]:30303",
|
||||
"upstream": "host.docker.internal:3030",
|
||||
"enabled": true
|
||||
}
|
||||
]
|
||||
@@ -141,6 +141,29 @@ services:
|
||||
networks:
|
||||
- app_network
|
||||
|
||||
toxiproxy:
|
||||
container_name: toxiproxy
|
||||
image: ghcr.io/shopify/toxiproxy:latest
|
||||
restart: always
|
||||
volumes:
|
||||
- ./config/toxiproxy.json:/config/toxiproxy.json
|
||||
ports:
|
||||
- "30303:30303" # Proxied webapp port
|
||||
- "8474:8474" # Toxiproxy API port
|
||||
networks:
|
||||
- app_network
|
||||
command: ["-host", "0.0.0.0", "-config", "/config/toxiproxy.json"]
|
||||
|
||||
nginx-h2:
|
||||
image: nginx:1.27
|
||||
container_name: nginx-h2
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8443:8443"
|
||||
volumes:
|
||||
- ./config/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
- ./config/certs:/etc/nginx/certs:ro
|
||||
|
||||
# otel-collector:
|
||||
# container_name: otel-collector
|
||||
# image: otel/opentelemetry-collector-contrib:latest
|
||||
|
||||
Reference in New Issue
Block a user