Skip to content

ilkerispir/envoy-api-based

Repository files navigation

Envoyproxy xDS Server

Envoy Logo

  • It is a modern Layer7(App) and Layer3(TCP) proxy
  • Incredibly modernized version of reverse proxies like NGINX, HAProxy
  • It is used in many projects: Istio service mash, API gateway products, etc.
  • Interesting part: Programming via API instead of file (xDS protocol)
  • Developed by Matt Klein at Lyft
  • Donated to CNCF(Kubernetes, gRPC, etc.) It graduated from there.
  • Those who integrate Envoy into their infrastructure: Google, AWS, etc.
  • It has support for Wire protocols(Redis, Memcached, MySQL, MongoDB, etc.)
  • RPC level LB instead of connection-level LB

Telemetry/Observability Properties

  • Metrics(L7 HTTP metrics)
    • Request count
    • Latency
    • Error rate
    • Status code
    • Bytes received/sent
    • Envoy's own metrics(CPU/Memory, TCP connection, Bytes, Bandwidth, QPS)
  • Distributed Tracing
    • A monitoring method that shows how long the RPCs between microservices keep and where they go.
    • Add TRACING HEADER if missing in incoming requests
    • Upload TRACEs to a certain location for requests coming to the server
      • Request In TRACE ID, start, end(Response)

Architecture

Architecture

Run Envoyproxy

func-e run -c proxy/envoy.yaml

Run xDS & Resource

Docker Compose

docker-compose up -d

Docker

docker run --rm -i -t -p 9101:8080 ilkerispir/resource
docker run --rm -i -t -p 9102:8080 ilkerispir/resource
docker run --rm -i -t -p 9002:9002 ilkerispir/xds

Run Jenkins

docker run -d -p 9080:8080 -p 60000:50000 jenkins/jenkins

cURL Test

curl http://localhost:9101; printf '\n';
curl http://localhost:9102; printf '\n';
while true; do curl http://localhost:9000; sleep .5; printf '\n'; done

Result

Result

Remove all containers & images

docker rm -vf $(docker ps -a -q)
docker rmi -f $(docker images -a -q)

References

🔗 Links

portfolio linkedin

Author

About

API-based dynamic endpoint discovery configuration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published