Overview
- Layer 7 (advanced)
- Content based routing
- Evaluates listener rules
- Use cases
- Single LB fronting different types of services (e.g. website, api)
- Microservices in containers (integrated wih ECS)
- Improved performance over ELB (cheaper)
- Integrated with WAF
- IPv6 support
Types
- Internet facing
- Internal
Limitations
- No backend authentication (unlike CLB)
Listeners
- HTTP/HTTPS
- Ports 1-65535
- HTTPS
- Multiple certificates possible (SNI)
- Smart selection if
- Multiple certificates possible (SNI)
- WebSockets
- HTTP (ws://) or HTTPS (wss://)
- HTTP/2
- HTTPS listeners only
- Server-Push not available
- Has Listener Rules (1+)
Listener Rule
- Contains
- Priority
- Action
- Always forward request
- Optional Host
- Host-based routing
- Optional Path
- Path-based routing
- Default rule has no conditions (catch-all)
Target
- Type
- EC2 instance
- IP address
- Inside/outside VPC (e.g. on-premise)
- IP must be private
- ClassicLink instances
- Peered-VPC
- On-premise instances (Direct Connection/VPN)
- Use case: migrate-to-cloud/burst-to-cloud/fail-over-to-cloud
- State
- draining
- Same target may be registered multiple times (different ports) e.g. microservices
Target Group
- Set of targets
- Listener rule forwards traffic to Target Group
- Has its own HealthCheck
- If no healthy targets still routes traffic
- You don't need to take the whole instance out of rotation
- May be attached to Auto Scaling Group
Request Tracing
- LB injects a header X-Amzn-Trace-Id
- Supports chaining: Field={Root, Self}
- Visible in Access Logs ("trace_id")
Sticky Sessions
- Only LB cookie supported (AWSALB)
- Websockets are inherently sticky (long-lasting connection)
Healthchecks
- Ability to define "successful" HTTP status codes
Pricing
- Per-hour fee
- LCU
- Dimenstions
- 3000 Active Connections per minute
- 25 new connections established per second
- Certificate key size matters (shorter = cheaper)
- 1000 rules evaluation
- Data transferred 2.25 Mbps (=1 GB/per-hour)
- Highest dimension used to evaluate number of LCUs consumed
- Dimenstions
References
- https://docs.aws.amazon.com/elasticloadbalancing/latest/application/doc-history.html
- https://github.com/open-guides/og-aws#alb
- https://aws.amazon.com/blogs/devops/introducing-application-load-balancer-unlocking-and-optimizing-architectures/
- https://aws.amazon.com/blogs/aws/new-application-load-balancing-via-ip-address-to-aws-on-premises-resources/
No comments:
Post a Comment