Skip to content

[feature] TCP proxy supporting #229

@benja-wu

Description

@benja-wu

Background

  • Easegress works as an L7-level proxy with multiple useful features. But it can't work as an L4-level proxy.

Requirement

  • Make Easegress as an L4-level proxy as well

Discussion

Question 1: Which kind of instance should this feature belong to?

  • Currently, Easegress has a big catalog as TafficGate for specified application protocols, such as HTTP, MQTT, and WebSocket.
  • There is a system-level controller called TrafficController, which manages HTTP-protocol-based HTTPServer and Pipeline by namespace.

Propose to add a new TCPProxy as HTTPServer. Other application level protocol implementations which are using TCP connection directly can be benefited from this TCPProxy managed by TrafficController

Question 2: Are there some awesome, open-sourced packages can we directly import?

  • The goproxy[1] seems to be a quite popular proxy implemented in Golang.

Question 3: How many basic features should a TCP proxy supported?

  • TLS supporting: multiple certificates supporting?
  • Multiple backends load-balancing: Round Robin, Weight Round Robin, Random...?
  • Timeout: sending timeout, connection timeout, receiving timeout?
  • Limited connection: reusing NewLimitListener in Easegress's util pkg?

Propose to confirm the TCPProxy spec firstly. In this spec, it should have a load balance type, listening port, backend array, TLS certificate encoding in base64, and so on...

Question 4: Should we introduce these advanced features in the future?

  • Health checking: such as NGINX[3]
  • Failover: such as Google Cloud balancing[4]
    .....

Summary

  • This is a draft design for the opening discussion. It's welcome to join us for telling your requirements and user scenarios, and let's figure out the basic, core features it should have together. Since Easegress is focusing on modern traffic orchestrating, some nice-to-have advanced feature we can hold it on and plan it implemented in the future.
  • Once we come to a Version 1 conclusion for this TCPProxy, PR for this implementation is also welcomed!

References

  1. https://github.com/snail007/goproxy
  2. https://doc.traefik.io/traefik/routing/services/
  3. https://docs.nginx.com/nginx/admin-guide/load-balancer/tcp-health-check/
  4. https://cloud.google.com/load-balancing/docs/tcp

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions