pingora
pingora copied to clipboard
Adding Host headers via arguments and route to upstream according to headers.
I am writing a load balancer that configures dynamically configure upstream and host headers.
Looking at here: https://github.com/cloudflare/pingora/issues/134 which is similar but is based on url paths.
If for example i want to support multiple Host
http header, i want to route to specific upstream servers for each requests with the Host
header.
I was hoping some documentation that helps me achieve that. My source code is at https://github.com/muhammadn/projectlb
I use pingora for my reverse proxy, you can look at the source code of upstream_peer
: https://github.com/vicanso/pingap/blob/main/src/proxy/server.rs#L336
graph TD;
start("New Request")-->server;
server -- "host:HostA, Path:/api/*" --> locationA
server -- "Path:/rest/*"--> locationB
locationA -- "10.0.0.1:8001" --> upstreamA1
locationA -- "10.0.0.2:8001" --> upstreamA2
locationB -- "10.0.0.1:8002" --> upstreamB1
locationB -- "10.0.0.2:8002" --> upstreamB2
This question has been stale for a week. It will be closed in an additional day if not updated.
This issue has been closed because it has been stalled with no activity.