_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN
Let's talk

Nginx jako Reverse Proxy

13. 04. 2019 1 min read intermediate

Nginx jako reverse proxy distribuuje provoz, terminuje SSL a přidává caching.

Reverse proxy

server { location / { proxy_pass http://127.0.0.1:3000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } }

Load balancing

upstream backend { least_conn; server 10.0.1.1:3000 weight=3; server 10.0.1.2:3000; } server { location / { proxy_pass http://backend; } }

WebSocket

location /ws/ { proxy_pass http://127.0.0.1:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection “upgrade”; }

Caching + rate limiting

proxy_cache_path /tmp/cache keys_zone=c:10m max_size=1g; limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s; location /api/ { limit_req zone=api burst=20 nodelay; proxy_pass http://backend; proxy_cache c; proxy_cache_valid 200 30m; }

Reverse proxy = produkce

SSL terminace, load balancing, caching — vše v jednom.

nginxreverse proxyload balancing
Share:

CORE SYSTEMS tým

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.