Sign inSign up

codingconcepts/dp

By codingconcepts

Updated about 1 year ago

A very simple dynamic proxy, that uses HTTP requests for live switching of downstream targets.

Image
Networking
API management
Databases & storage
0

769

codingconcepts/dp repository overview

Start the proxy as follows:

docker run --rm -it \
    codingconcepts/dp:0.1.0 \
        --server "localhost:26001" \
        --server "localhost:26002" \
        --port 26257 \
        --ctl-port 3000 \
        --debug

Select a server (routes requests to localhost:26001):

curl http://localhost:3000/servers \
  -H 'Content-Type:application/json' \
  -d '{"server": "localhost:26001", "force_close": true }'

Select a different server (routes requests to localhost:26002):

curl http://localhost:3000/servers \
  -H 'Content-Type:application/json' \
  -d '{"server": "localhost:26002", "force_close": true }'

Drain connections

curl -X DELETE http://localhost:3000/servers \
  -H 'Content-Type:application/json'

Tag summary

Content type

Image

Digest

sha256:9e51ed964

Size

5.1 MB

Last updated

about 1 year ago

docker pull codingconcepts/dp:v0.11.0