1

I am developing a webservice, which offers different services, but currently under different ports. Existing services like GitHub or GitLab also several services, but I am wondering how they can expose them under a single port. Are they looking at the header of request and decide if it is a git client or web browser request and tunnel the request to the corresponding handler?

Are there any keywords or topics in this regard, which could help me to understand how its technically done? Thank you!

1 Answer 1

3

Yes, typically this problem is solved by reading HTTP headers and then applying rules to direct the traffic to the appropriate host:port. This is sometimes called "content-switching" and is typically one of the primary functions of a proxy. Nginx and HAProxy are popular tools used for this purpose (although Apache Httpd can do it also). Envoy Proxy is newer tool used for this purpose.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.