We define a configuration group in the plugin configuration that includes each data center and the services within it. It allows to configure a separate upstream for each service, while using the datacenter-level upstream as a fallback.
When the request arrives, we parse the content of the source Host and extract the target data center and services from it.
Then it will read that desired upstream from our predefined list of upstreams and set it as the upstream for this request. In this process, the request header and request body will be sent directly to the target service without being modified.