Skip to content

Latest commit

 

History

History
121 lines (102 loc) · 3.54 KB

load-balancer.md

File metadata and controls

121 lines (102 loc) · 3.54 KB

Load Balancer

The reverse proxy is the common middleware that is accessed by clients, forwards them to backend servers. The reverse proxy is a very core role played by Easegress.

Why Use Easegress as Reverse Proxy

Easegress integrates many features as a reverse proxy with easy configuration.

  • Offload SSL/TLS layer
  • Hot-updated routing without losing requests
  • Intercept invalid requests (according to IP, metadata of requests, credential verification, etc)
  • Adapting requests to satisfy requirements of backend servers
  • Bring more resilience for backend servers (rate limiting, time limiting, circuit breaker, retrying)
  • Load balance for backend servers (static addresses, or integration with service registry)
  • Compression and Caching for response

Basic: Load Balance

The filter Proxy is the filter to fire requests to backend servers. It contains servers group under load balance, whose policy support roundRobin, random, weightedRandom, ipHash, headerHash.

name: pipeline-reverse-proxy
kind: Pipeline
flow:
  - filter: proxy
filters:
  - name: proxy
    kind: Proxy
    pools:
    - servers:
      - url: https://127.0.0.1:9095
      - url: https://127.0.0.1:9096
      - url: https://127.0.0.1:9097
      loadBalance:
        policy: roundRobin

Traffic Adaptor: Change Something of Two-Way Traffic

Sometimes backend applications can't adapt to quick changes of requirements of traffic. Easegress could be an adaptor between new traffic and old applications. There are 2 phases of adaption in reverse proxy: request adaption, response adaption.