Skip to content

Instantly share code, notes, and snippets.

@kemingy
Last active June 19, 2020 11:18
Show Gist options
  • Save kemingy/44206b6cec166dff32d61711132f6a0f to your computer and use it in GitHub Desktop.
Save kemingy/44206b6cec166dff32d61711132f6a0f to your computer and use it in GitHub Desktop.

Features Required

  • prevent single point faliure
  • batch requests
  • scaling
  • job recovery (retry)

Queue

RabbitMQ

  • message acknowledgment
  • message durability (both for queue and messages)
  • dispatch: round robin (prefetch_count)

Redis

  • suitable for short-live message

Kafka

  • large amounts of data for a long time

Load Balancer

NGINX

  • load balance methods
    • round robin
    • least connection
    • least time (PLUS)
    • generic hash
    • IP hash
    • random

kube-proxy IPVS

  • rr: round robin
  • lc: least connection (smallest number of open connections)
  • dh: destination hashing
  • sh: source hashing
  • sed: shortest expected delay
  • nq: never queue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment