Projects
TCP Proxy in rust
Checkpoint 0
- Single threaded implentation using simple tcplistener.
- Tcplistener accepts connection and we relay data from downstream to upstream.
Checkpoint 1
- Single listner port and single upstream.
- Epoll implemetation but can only support one connection at a time.
Checkpoint 2
- Single listner port and single upstream.
- Can handle multiple parallel connections and uses epoll.
Checkpoint 3
The TCP Proxy can
- Reads the config file and sets itself up accordingly with the listening ports and the upstreams the customer want to forward the request.
- Currently it expects the upstream server is alwasys up and round robins among the avilable.
Checkpoint 4
- Handle stream half close.
- And do current state based upstream selection and fallback to next upstream server.
Checkpoint 5
- Implement closing of idle tcp sessions.
- The idle events are processed in main event loop itself.