Container Network Configuration
Configure protocol, port mappings, TLS, and load balancer integration for container networking.
Network Configuration
Configure network settings for your Docker container, including load balancer ports, communication protocols, and TLS encryption. Network configuration determines how external traffic reaches your container and how your application communicates with other services.
Network Settings Overview
The network configuration provides control over:
- Protocol Selection: Choose between TCP and UDP protocols
- TLS Encryption: Enable secure connections with TLS/SSL termination
Network Protocol
Protocol Selection
Choose the appropriate protocol for your application's communication needs:
- TCP (Transmission Control Protocol): Reliable, connection-oriented
- UDP (User Datagram Protocol): Faster, connectionless protocol suitable for
Common Protocol Uses:
- TCP: Web servers (HTTP/HTTPS), APIs (REST/GraphQL), databases, file
- UDP: DNS services, video streaming, online gaming, IoT sensor data
Port Mappings
Port mappings define how external traffic reaches your container by connecting container ports to host ports accessible from outside your project.
Understanding Port Mapping
- Container Port: The port your application listens on inside the container
- TLS: Whether to enable TLS/SSL encryption for this port mapping
Port Mapping Examples
Web Application (HTTP):
- Container Port:
3000(your app's internal port)
80 (standard HTTP port)
- TLS:
Disabled
Web Application (HTTPS):
- Container Port:
3000(your app's internal port)
443 (standard HTTPS port)
- TLS:
Enabled
API Service:
- Container Port:
8080(API server port)
8080 (external API access)
- TLS:
Enabled(for secure API calls)
TLS Configuration
What is TLS?
TLS (Transport Layer Security) provides encryption for data transmitted between clients and your container. It ensures:
- Data Encryption: All communication is encrypted in transit
- Data Integrity: Protection against data tampering during transmission
When to Enable TLS
Enable TLS for:
- Public-facing web applications (HTTPS)
- Services processing user authentication
TLS may not be needed for:
- Internal services within the project network
- Services behind additional TLS termination
TLS Best Practices
- Always use TLS for production web applications
- Consider performance impact - TLS adds small overhead
Load Balancer Integration
Automatic Load Balancing
TagoIO Deploy automatically integrates your container with the project's load balancer:
- Traffic Distribution: Incoming requests are distributed across container
- Health Checks: Automatic monitoring of container health and availability
- Scaling Support: Load balancer adapts to container scaling events
Load Balancer Features
- High Availability: Automatic failover if container instances become
- Geographic Distribution: Traffic routing based on client location
- Performance Optimization: Connection pooling and request optimization
Common Network Configurations
Single Web Application
Simple web app setup:
Protocol: TCP
Port Mapping:
- Container: 3000 → Host: 80 (TLS: Disabled)
- Container: 3000 → Host: 443 (TLS: Enabled)
Microservice with API
Service with both web interface and API:
Protocol: TCP
Port Mappings:
- Container: 3000 → Host: 80 (TLS: Disabled, Web UI)
- Container: 3000 → Host: 443 (TLS: Enabled, Web UI)
- Container: 8080 → Host: 8080 (TLS: Enabled, API)
Security Considerations
Network Security
- Minimize Exposed Ports: Only expose ports that need external access
- Port Ranges: Avoid using well-known system ports (1-1023) unless necessary
Access Control
- Internal Services: Consider if services need external access or can remain
- Authentication: Implement application-level authentication for sensitive
- Rate Limiting: Configure application-level rate limiting for public APIs
Troubleshooting
Common Network Issues
Service Not Accessible:
- Verify port mappings are configured correctly
- Ensure the container is running and healthy
TLS Connection Issues:
- Verify TLS is enabled for the correct port mapping
- Ensure certificates are properly configured (handled automatically by TagoIO)
Protocol Mismatch:
- Confirm your application uses the same protocol (TCP/UDP) as configured
- Check application logs for connection errors
Performance Issues:
- Consider if TLS overhead is affecting performance
- Monitor load balancer metrics for bottlenecks