Overview
Ant Media Server can be deployed on Google Cloud Platform (GCP) using Compute Engine instances, GCP Marketplace for one-click deployment, or Managed Instance Groups (MIG) for auto-scaling capabilities.Deployment Methods
GCP Marketplace (Recommended)
Deploy Ant Media Server Enterprise Edition directly from GCP Marketplace:- Enterprise Edition: GCP Marketplace Link
Currently, only the Enterprise Edition is available on GCP Marketplace. Community Edition can be deployed manually on Compute Engine.
Manual Compute Engine Deployment
Deploy on a Compute Engine VM instance with custom configuration.Managed Instance Groups
Automated scaling using MIG with load balancing for high-traffic scenarios.Compute Engine Instance Requirements
Machine Types
Development/Testing:- Machine Type:
e2-mediumorn1-standard-2 - vCPUs: 2
- Memory: 4 GB
- Cost: ~$50-70/month
- Machine Type:
c2-standard-4orn2-standard-4 - vCPUs: 4
- Memory: 8-16 GB
- Network: Premium tier
- Cost: ~$150-250/month
- Machine Type:
c2-standard-8orc2-standard-16 - vCPUs: 8-16
- Memory: 16-32 GB
- Network: Premium tier, 10+ Gbps
- SSD persistent disk
- Cost: ~$300-600/month
Operating System Images
Supported Images:- Ubuntu 20.04 LTS
- Ubuntu 22.04 LTS
- Debian 11 (Bullseye)
- Debian 12 (Bookworm)
- CentOS Stream 8/9
- Red Hat Enterprise Linux 8/9
Ubuntu 20.04 LTS or 22.04 LTS from ubuntu-os-cloud project is recommended.
Boot Disk
- Size: 30 GB minimum (50 GB recommended)
- Type: SSD persistent disk (pd-ssd) for production
- Additional Disk: 100-500 GB for stream recordings
Quick Start: GCP Marketplace Deployment
1
Access GCP Marketplace
- Log into Google Cloud Console (https://console.cloud.google.com)
- Navigate to Marketplace
- Search for “Ant Media Server Enterprise Edition”
- Click on the listing
2
Launch Instance
Click Launch and configure:
- Deployment name: antmedia-server
- Zone: Select region (e.g., us-central1-a)
- Machine type: c2-standard-4 or larger
- Boot disk: 30 GB SSD persistent disk
3
Configure Firewall
Enable firewall rules:
- ✓ Allow HTTP traffic (port 5080)
- ✓ Allow HTTPS traffic (port 5443)
- Additional ports configured automatically
4
Deploy
- Review configuration
- Click Deploy
- Wait for deployment (5-10 minutes)
- Note the external IP address
5
Access Web Panel
Open browser to
http://EXTERNAL_IP:5080Create admin account on first accessManual Compute Engine Deployment
1
Create VM Instance
Using gcloud CLI:
2
Create Firewall Rules
Configure firewall (see section below):
3
Connect to Instance
SSH into the instance:
4
Verify Installation
Check service status:Get external IP:
Firewall Configuration
Required Firewall Rules
Create firewall rules for all required ports:Using gcloud CLI
Static External IP
Reserve Static IP
Configure Server Name
Managed Instance Groups (Auto-Scaling)
Create Instance Template
Create Managed Instance Group
Create Load Balancer
Persistent Disk Configuration
Create and Attach Disk
Mount the Disk
Cloud Storage Integration
Create Storage Bucket
Configure Service Account
Database Configuration (Enterprise)
Cloud Firestore (MongoDB Alternative)
For serverless NoSQL database option, use Cloud Firestore in native mode.MongoDB Atlas on GCP
Deploy MongoDB Atlas cluster on GCP for managed MongoDB:- Create MongoDB Atlas account
- Deploy cluster in same GCP region
- Configure network peering or IP whitelist
- Get connection string
Configure Cluster Mode
Cloud SQL (Alternative)
For managed relational database needs (not for Ant Media Server primary DB, but for custom integrations).SSL/TLS Configuration
Using Let’s Encrypt
Using Google-Managed SSL Certificates
For load balancer SSL termination:Monitoring with Cloud Monitoring
Enable Cloud Monitoring Agent
Create Alert Policies
Custom Metrics
Send custom Ant Media Server metrics to Cloud Monitoring using the API.Backup and Disaster Recovery
Snapshot Schedule
Manual Snapshot
Multi-Region Deployment
Deploy in multiple regions for disaster recovery:- Primary: us-central1
- Backup: europe-west1
- Use Cloud DNS for failover
Cost Optimization
Committed Use Discounts
Purchase 1-year or 3-year committed use contracts for up to 57% discount.Preemptible VMs
For non-critical workloads (up to 80% discount):Custom Machine Types
Optimize vCPU and memory ratio:Troubleshooting
Instance Not Accessible
- Check firewall rules:
gcloud compute firewall-rules list - Verify instance is running:
gcloud compute instances list - Check serial port output:
gcloud compute instances get-serial-port-output antmedia-server --zone=us-central1-a
Performance Issues
- Check Cloud Monitoring dashboards
- Verify machine type is appropriate
- Check disk performance metrics
- Review application logs:
gcloud compute ssh antmedia-server --zone=us-central1-a --command="sudo journalctl -u antmedia -n 100"
WebRTC Connection Issues
- Verify UDP firewall rules
- Check external IP configuration
- Ensure server.name is set correctly
- Test STUN/TURN connectivity
