Installation
Running the Server
STDIO Transport Mode
HTTP Streaming Transport Mode
Available Tools
The server provides the following tools for managing network load balancers:| Tool Name | Description |
|---|---|
list_network_load_balancers | List network load balancers in a given compartment |
get_network_load_balancer | Get detailed information about a network load balancer |
list_network_load_balancer_listeners | List listeners in a given network load balancer |
get_network_load_balancer_listener | Get a listener by name from a network load balancer |
list_network_load_balancer_backend_sets | List backend sets in a given network load balancer |
get_network_load_balancer_backend_set | Get a backend set by name from a network load balancer |
list_network_load_balancer_backends | List backends in a given backend set and network load balancer |
get_network_load_balancer_backend | Get a backend by name from a backend set and network load balancer |
Usage Examples
List Network Load Balancers
Get Load Balancer Details
Working with Listeners
Managing Backend Sets
Working with Backends
Understanding Network Load Balancers
What is a Network Load Balancer?
Network Load Balancer is a Layer 4 (TCP/UDP) load balancing service that:- Distributes traffic across multiple backend servers
- Provides high availability and fault tolerance
- Operates at the connection level
- Preserves source IP addresses
- Offers ultra-low latency and high throughput
- Handles millions of requests per second
Key Components
Listeners- Frontend configuration that accepts incoming traffic
- Defined by protocol (TCP/UDP) and port
- Routes traffic to backend sets
- Can have multiple listeners per load balancer
- Logical grouping of backend servers
- Includes health check configuration
- Defines load balancing policy (e.g., round robin, least connections)
- Can contain multiple backends
- Individual servers (compute instances) that receive traffic
- Identified by IP address and port
- Monitored via health checks
- Can be drain/enabled/disabled individually
- Monitor backend server health
- Automatically remove unhealthy backends from rotation
- Configurable intervals and thresholds
- Support TCP and HTTP health checks
Network Load Balancer vs Application Load Balancer
Network Load Balancer (Layer 4):- TCP/UDP traffic
- Ultra-low latency
- Preserves source IP
- Millions of requests per second
- Simple connection-based routing
- HTTP/HTTPS traffic
- Content-based routing
- SSL termination
- Advanced features (path routing, host-based routing)
- Web application firewall integration
Authentication
The server uses OCI CLI configuration from~/.oci/config. Ensure you have:
- OCI CLI installed and configured
- Valid API credentials
- Appropriate IAM permissions for load balancer operations
Required Permissions
Your OCI user or instance principal needs these IAM permissions:Common Use Cases
High Availability Architecture
- Distribute traffic across multiple availability domains
- Automatically route around failed instances
- Scale backend capacity horizontally
- Provide fault tolerance for critical applications
Database Load Balancing
- Load balance database connections
- Distribute read replicas
- Handle connection pooling
- Support active-passive failover
Gaming and Real-Time Applications
- Ultra-low latency requirements
- High throughput for concurrent connections
- Preserve client IP addresses
- Support UDP protocols
Microservices Architecture
- Route internal service-to-service traffic
- Private load balancers for backend services
- Service discovery and health checking
- Dynamic scaling of service instances
Best Practices
Health Check Configuration
- Set appropriate intervals and timeouts
- Use TCP checks for simple availability
- Use HTTP checks for application-level health
- Configure reasonable thresholds to avoid flapping
Backend Management
- Drain backends before maintenance
- Monitor backend health status
- Distribute backends across availability domains
- Use connection draining for graceful shutdowns
Security
- Use private load balancers for internal traffic
- Configure security lists and NSGs
- Implement backend server authentication
- Monitor access logs for anomalies
Performance
- Right-size backend instance shapes
- Monitor connection counts and latency
- Use reserved bandwidth when needed
- Scale backend sets based on load
Monitoring and Troubleshooting
Check Load Balancer Health
Verify Backend Health
Common Issues
All Backends Unhealthy:- Verify health check configuration
- Ensure backends are running and accessible
- Check security list/NSG rules allow health check traffic
- Verify application is responding on health check port
- Check load balancing policy
- Verify all backends have same weight
- Ensure backends have similar capacity
- Check for long-lived connections
- Verify listener port and protocol
- Check backend server timeout settings
- Ensure network connectivity
- Review security rules
Related Services
- Networking - Manage VCNs and subnets
- Compute - Manage backend instances
- Monitoring - Monitor load balancer metrics
- Cloud Guard - Security monitoring
