Alibaba Cloud ECS Tutorial: Server Specs, Configuration, and Pricing Guide [2025]
Alibaba Cloud ECS Tutorial: Server Specs, Configuration, and Pricing Guide [2025]
First time using Alibaba Cloud to create a server, and seeing dozens of specs with no idea how to choose?
Choose too large and you waste money; choose too small and performance suffers.
This tutorial will start from zero, teaching you how to select the right specs, configure your server, and control costs.

What is Alibaba Cloud ECS?
ECS stands for Elastic Compute Service.
In plain terms: it's renting a virtual computer in Alibaba Cloud's data center.
You can:
- Choose how many CPUs and how much memory you need
- Choose to install Windows or Linux
- Adjust specs at any time
- Pay only for what you use
What Can ECS Do?
Almost anything that needs a server:
- Host websites: WordPress, corporate sites, e-commerce platforms
- Run applications: App backend APIs, data processing
- Development and testing: Create test environments, CI/CD workflows
- Game servers: Minecraft, private server hosting
- Databases: Self-managed MySQL, PostgreSQL
ECS vs VPS vs Physical Servers
| Item | Physical Server | VPS | ECS (Cloud Server) |
|---|---|---|---|
| Hardware | Dedicated physical machine | Virtualized partition | Virtualized partition |
| Spec Changes | Need to change machines | Limited | Adjust anytime |
| Payment | Monthly/yearly rent | Monthly rent | Pay-as-you-go/subscription |
| Scalability | Poor | Average | Excellent |
| Cost | High | Low | Medium |
| Operations Complexity | High | Medium | Low |
Simple conclusion:
- Very low budget, very little traffic: Use cheap VPS
- Production environment, need flexibility: Use ECS
- Special requirements, maximum performance: Use physical server
To learn about Alibaba Cloud's complete services, see Alibaba Cloud Complete Guide: From Beginner to Advanced, Essential Reading for International Users [2025].
ECS Specifications and Instance Type Selection
This is the most confusing part for beginners.
Alibaba Cloud ECS has dozens of instance types with names that look like codes: g7, c7, r7, e...
Don't panic—once you understand the naming convention, it's quite simple.
Instance Type Naming Convention
Take ecs.g7.large as an example:
- ecs: Product name
- g7: Instance family (g = general purpose, 7 = 7th generation)
- large: Size specification
Main Instance Families
General Purpose (g series)
CPU to memory ratio is 1:4.
Examples: 2 cores 8GB, 4 cores 16GB, 8 cores 32GB
Suitable scenarios:
- Most websites and applications
- Small to medium databases
- Development and testing environments
This is the most commonly used type—if you don't know what to choose, pick this one.
Compute Optimized (c series)
CPU to memory ratio is 1:2.
Examples: 2 cores 4GB, 4 cores 8GB, 8 cores 16GB
Suitable scenarios:
- CPU-intensive computing
- Batch processing
- High-traffic web frontends
- Game servers
Memory Optimized (r series)
CPU to memory ratio is 1:8.
Examples: 2 cores 16GB, 4 cores 32GB, 8 cores 64GB
Suitable scenarios:
- Large databases
- Memory caching (Redis, Memcached)
- Big data analytics
Economy (e series)
Entry-level specs, cheapest prices.
Suitable scenarios:
- Personal websites
- Development testing
- Low-traffic applications
Note: Lower performance, not suitable for production environments.
GPU Instances
Equipped with NVIDIA GPUs.
Suitable scenarios:
- AI model training
- Deep learning inference
- Video transcoding
- 3D rendering
If you need GPUs for AI applications, see Alibaba Cloud AI Services Complete Guide.
Data Center Selection for International Users
Alibaba Cloud has multiple data centers in Asia Pacific:
| Data Center | Latency to Asia | Recommended Use |
|---|---|---|
| Hong Kong | 30-50ms | Most recommended, lowest latency |
| Singapore | 50-80ms | When serving Southeast Asian users |
| Tokyo | 40-60ms | When serving Japanese users |
| Shanghai/Beijing | 60-100ms | When serving Chinese users |
International users should choose Hong Kong data center first.
Only consider data centers within mainland China if your users are primarily in China (but note ICP filing requirements).

Choosing too large wastes money, too small hurts performance. Not sure which spec to choose? Schedule architecture consultation and let us help you evaluate.
ECS Creation and Setup Tutorial
Hands-on practice once is more effective than reading ten articles.
Step 1: Log into Console
- Go to Alibaba Cloud International
- Log into your account
- Find "Elastic Compute Service" in the product list
- Click to enter ECS console
If you don't have an account yet, see Alibaba Cloud International Complete Guide: Registration, Services, and Pricing for International Users.
Step 2: Create Instance
Click the "Create Instance" button.
Billing method selection:
- Pay-as-you-go: For testing, can delete anytime
- Subscription: For production, cheaper
Region selection:
- Choose "Hong Kong" (lowest latency for most international users)
Step 3: Select Instance Specifications
Choose based on your needs:
| Use Case | Recommended Spec | Monthly Cost (approx.) |
|---|---|---|
| Personal blog | ecs.e-c1m1.large (1 core 2GB) | $5-10 |
| Small website | ecs.g7.small (1 core 2GB) | $15-25 |
| Corporate website | ecs.g7.large (2 cores 8GB) | $40-60 |
| E-commerce platform | ecs.g7.xlarge (4 cores 16GB) | $80-120 |
| High-traffic app | ecs.g7.2xlarge (8 cores 32GB) | $160-240 |
Tip: Start with smaller specs, upgrade if needed. ECS supports online upgrades without rebuilding.
Step 4: Select Operating System
Linux options:
- CentOS: Stable, enterprise favorite (but maintenance discontinued)
- Ubuntu: Active community, beginner-friendly
- Alibaba Cloud Linux: Alibaba Cloud optimized version, free
- Debian: Lightweight and stable
Windows options:
- Windows Server 2019/2022
- Requires additional licensing fee
Recommendation: If no special requirements, choose Ubuntu 22.04 LTS or Alibaba Cloud Linux 3.
Step 5: Configure Storage
System disk:
- Minimum 20GB, recommended 40-100GB
- Choose "ESSD" type for best performance
Data disk (optional):
- If you need additional storage space
- Can be added anytime, don't need to buy initially
Money-saving tip: Store large static files in OSS instead—much cheaper than ECS disk. See Alibaba Cloud OSS Complete Tutorial.
Step 6: Configure Network
VPC (Virtual Private Cloud):
- First time will auto-create default VPC
- Can also create custom VPC
Public IP:
- Check "Assign public IPv4 address"
- Bandwidth selection: Pay-by-traffic is more flexible
Security Group:
- This is ECS's firewall
- Detailed explanation below
Step 7: Set Login Method
Linux:
- Recommend using "SSH key pair", more secure than password
- If using password, must set a strong password
Windows:
- Set Administrator password
Step 8: Confirm and Create
Check all settings, confirm costs, click "Create Instance".
A few minutes later, ECS will be created.
Security Group Configuration Tutorial
Security groups are ECS's firewall.
Incorrect configuration will cause:
- Website won't open (didn't open 80/443)
- SSH won't connect (didn't open 22)
- Hacker intrusion (opened too many ports)
Common Port Reference Table
| Port | Purpose | Should Open? |
|---|---|---|
| 22 | SSH (Linux remote access) | Required for Linux |
| 3389 | RDP (Windows Remote Desktop) | Required for Windows |
| 80 | HTTP (website) | Required for websites |
| 443 | HTTPS (encrypted website) | Required for websites |
| 3306 | MySQL database | Open with caution |
| 6379 | Redis | Open with caution |
Security Group Configuration Steps
- Enter ECS console
- Click "Security Groups" in left menu
- Find your security group, click "Configure Rules"
- Click "Add Security Group Rule"
Example: Open website ports
| Setting | Value |
|---|---|
| Rule Direction | Inbound |
| Authorization Policy | Allow |
| Protocol Type | Custom TCP |
| Port Range | 80/80 |
| Authorization Object | 0.0.0.0/0 |
Repeat above steps to open port 443.
Security Group Best Practices
1. Principle of Least Privilege
Only open needed ports, close everything else.
2. Restrict Source IPs
If possible, restrict access to specific IPs only.
Example: SSH only allows company IP to connect.
3. Don't Expose Databases Publicly
MySQL, Redis and other database services shouldn't be directly exposed to internet.
Applications connect via internal network—secure and fast.

ECS Pricing
Alibaba Cloud ECS costs consist of multiple parts.
Many people only look at instance cost, then overspend.
Cost Components
| Cost Item | Description | Billing Method |
|---|---|---|
| Instance Fee | CPU + memory cost | Pay-as-you-go/Subscription |
| System Disk | Disk where OS is installed | By capacity |
| Data Disk | Additional storage space | By capacity |
| Public Network Traffic | Outbound transfer | Per GB |
| Snapshots | Disk backups | By capacity |
| Elastic IP | Fixed public IP (optional) | By time |
Cost Example
Scenario: Hosting a small-medium website
| Item | Specification | Monthly Cost (approx.) |
|---|---|---|
| ECS Instance | g7.large (2 cores 8GB) annual | $45 |
| System Disk | ESSD 40GB | $4 |
| Public Traffic | 100GB/month | $8 |
| Snapshots | 40GB | $1 |
| Total | $58/month |
Money-Saving Tips
1. Use Subscription
30-50% cheaper than pay-as-you-go.
If you're sure about long-term use, definitely choose annual subscription.
2. Use Spot Instances
Spot instances can be as low as 10% of pay-as-you-go price.
But may be reclaimed, suitable for interruptible tasks.
3. Put Static Files in OSS
Images, videos and large files in OSS + CDN are cheaper than ECS disk.
4. Check Bills Regularly
Alibaba Cloud console has cost analysis tools.
Recommend checking weekly to catch anomalies early.
5. Use the Right Instance Type
Don't choose oversized specs "just in case".
ECS can be upgraded anytime—start small.
Alibaba Cloud has many billing items, easy to overspend. Free bill health check, we'll help you find savings.
Common Issues and Troubleshooting
Q1: Can't SSH connect, what to do?
Checklist:
- Confirm ECS status is "Running"
- Confirm security group has port 22 open
- Confirm public IP is correct
- Confirm password or SSH key is correct
- Use ping to test network connectivity
Common causes:
- Security group didn't open port 22 (most common)
- Password entered wrong
- Firewall blocking
Q2: Website won't open, what to do?
Checklist:
- Confirm web service (Nginx/Apache) is running
- Confirm security group has ports 80 and 443 open
- Confirm domain DNS resolution is correct
- Confirm ECS system firewall settings
Q3: ECS is very slow, what to do?
Possible causes:
- CPU or memory insufficient → Upgrade specs
- Disk I/O bottleneck → Switch to ESSD
- DDoS attack → Enable DDoS protection, see Alibaba Cloud CDN and DNS Tutorial: Acceleration Setup and DDoS Protection Guide
- Application issue → Check your application
Diagnosis method:
Enter ECS console, view monitoring data:
- CPU usage
- Memory usage
- Disk I/O
- Network traffic
Q4: How to backup ECS?
Method 1: Snapshots
Create disk snapshots in console, can restore to any point in time.
Method 2: Images
Create the entire ECS as an image, can quickly clone to new ECS.
Method 3: Auto Snapshot Policy
Set up auto snapshots, backs up daily automatically.
Q5: How to upgrade ECS specs?
- Enter ECS console
- Select instance to upgrade
- Click "More" → "Instance Type Adjustment"
- Select new specs
- Confirm price difference
- Restart to take effect
Note: Some spec changes require shutdown, recommend during maintenance windows.

FAQ
Q1: When would we pick Alibaba Cloud ECS over AWS EC2 or GCP Compute Engine?
Three specific scenarios. (1) Targeting Chinese mainland users — Alibaba Cloud has the broadest presence in mainland China; AWS/GCP have regulatory barriers (ICP license requirements) and higher latency to mainland users; (2) Integrating with Alibaba ecosystem — if your business uses Taobao, Tmall, Alipay, or Lazada, Alibaba Cloud has native integrations and often better SLAs; (3) Cost-sensitive APAC workloads — for Hong Kong, Singapore, and some Southeast Asia regions, Alibaba Cloud pricing is often 20–30% cheaper than AWS/GCP. When not to pick Alibaba Cloud: (A) main customers outside China — service breadth and tooling ecosystem lag behind AWS/GCP; (B) enterprise compliance (US SOC 2, HIPAA, GDPR) — Alibaba's coverage is weaker; (C) needing cutting-edge AI services — GCP Gemini and AWS Bedrock offer more choice; (D) multi-cloud strategy — Terraform and other IaC tools have better AWS/GCP module support.
Q2: What are the gotchas with Alibaba Cloud ECS pricing that differ from AWS?
Four significant differences. (1) Bandwidth billing — Alibaba Cloud charges for public bandwidth by peak rate (BGP bandwidth by Mbps, not GB) or by traffic; AWS charges purely by GB egress. For stable traffic, "bandwidth by Mbps" can be cheaper; for bursty traffic, it's expensive. (2) Subscription vs pay-as-you-go — Alibaba Cloud's annual subscription (prepaid yearly) is 30–50% cheaper than pay-as-you-go, a bigger gap than AWS's Savings Plans vs on-demand difference. Commit to subscription only after validating stable workloads. (3) Data transfer is often charged both directions — unlike AWS where ingress is free, some Alibaba Cloud services charge both ingress and egress (especially between regions). (4) Snapshot and image storage — snapshot costs are often underestimated; large-disk instances can accumulate GB-scale snapshot fees monthly. Set up lifecycle policies to auto-delete old snapshots.
Q3: How does Alibaba Cloud's security compare to AWS/GCP? Should we worry about data residency in China?
Alibaba Cloud security is world-class; data residency depends on region selected. (1) Security posture — Alibaba Cloud has SOC 1/2/3, ISO 27001, CSA STAR, PCI-DSS certifications; security service lineup (Anti-DDoS, Cloud Firewall, WAF, CloudSSO) is comprehensive. (2) Data residency reality — (A) Mainland China regions — subject to Chinese data regulations (Data Security Law, PIPL); government access requests are different from Western jurisdictions; (B) Non-China regions (Singapore, Hong Kong, Frankfurt, US West, Japan, etc.) — data stays in-region with Alibaba Cloud's standard enterprise guarantees, similar to AWS/GCP; (C) Chinese mainland regions should only be used for content targeting Chinese users — don't host global SaaS data there for regulatory reasons. (3) Network security differences — (A) mainland regions require ICP filing for public-facing websites (30–60 days processing); (B) Great Firewall affects outbound traffic from mainland regions to foreign services. Practical guidance: for non-China workloads, Alibaba Cloud's Singapore or Hong Kong regions are excellent; avoid mainland regions unless specifically serving Chinese users.
Q4: What's the typical migration effort from AWS EC2 to Alibaba Cloud ECS?
Similar to any cross-cloud migration — 3–9 months depending on complexity. Specific effort items: (1) VM images and snapshots — Alibaba Cloud has Image Migration Service; AMI → ECS image conversion takes minutes per VM, but testing takes weeks. (2) Network rewiring — Security Groups, VPCs, subnets all need re-creation; Terraform modules often differ. Plan 2–4 weeks. (3) Database migration — ApsaraDB replaces RDS; DMS (Data Migration Service) handles online migration; expect 1–3 months including testing. (4) Load balancer and DNS cutover — Server Load Balancer (SLB) replaces ALB/NLB; DNS TTL reduction to 60 seconds before cutover is standard. (5) Monitoring and logging — CloudMonitor replaces CloudWatch; re-configure all alerts. (6) Team learning curve — Alibaba Cloud docs are now largely English but UX differs; expect 1–2 weeks for engineers to get comfortable. Cost traps: (A) egress out of AWS is $0.09/GB; 1PB migration = $92K; (B) parallel run for 3–6 months means paying both clouds. Typical total cost: mid-sized migration $50K–500K.
Q5: How does Alibaba Cloud ECS interact with other Alibaba services (RDS, OSS, SLB)?
Very tightly integrated — the ecosystem is Alibaba Cloud's main advantage. (1) ECS + RDS — use VPC peering; ECS connects to RDS via internal IP with no egress fee; backup snapshots auto-sync to OSS. (2) ECS + OSS (Object Storage Service) — OSS is S3-equivalent; ECS accesses OSS via internal endpoint (free, low latency) or public endpoint (billed, higher latency). Always use internal endpoints when possible. (3) ECS + SLB (Server Load Balancer) — similar to AWS ALB; 7-layer load balancing supports WAF integration, health checks, sticky sessions. (4) ECS + CDN — Alibaba's CDN covers mainland China best; for global use, comparable to Cloudflare/Akamai but slightly less widespread outside APAC. (5) ECS + Function Compute — Alibaba's serverless function service, can be triggered by OSS events, API Gateway, message queues. Practical tip: Alibaba Cloud's network architecture is more "VPC-centric" than AWS — most services expose both public and internal endpoints; always prefer internal to minimize cost and latency. Many migration headaches come from teams not knowing about internal endpoints and accidentally using public ones.
Need a Second Opinion on Architecture Design?
Cloud server spec selection directly affects cost and performance:
- Choose too large: Spend thousands extra monthly
- Choose too small: Performance bottleneck affects user experience
- Wrong architecture: Difficult to scale later
How CloudInsight Can Help
- Requirements Analysis: Understand your traffic, user distribution, growth expectations
- Spec Recommendations: Recommend best configuration based on actual needs
- Architecture Design: Plan high-availability, scalable cloud architecture
- Cost Optimization: Find savings opportunities, avoid waste
Schedule architecture consultation and let's review your requirements together.
We'll give you the best recommendations based on your traffic, budget, and growth expectations.
From single ECS to complex microservices architecture, we have experience
👉 Schedule now for professional architecture advice
References
- Alibaba Cloud ECS Documentation - https://www.alibabacloud.com/help/ecs
- ECS Instance Type Families - https://www.alibabacloud.com/help/ecs/user-guide/instance-families
- Alibaba Cloud Pricing Calculator - https://www.alibabacloud.com/pricing-calculator
- ECS Best Practices - https://www.alibabacloud.com/help/ecs/best-practices
- Security Group Configuration Guide - https://www.alibabacloud.com/help/ecs/user-guide/security-groups
Need Professional Cloud Advice?
Whether you're evaluating cloud platforms, optimizing existing architecture, or looking for cost-saving solutions, we can help
Book Free ConsultationRelated Articles
Alibaba Cloud International Complete Guide: Registration, Services, and Pricing for International Users [2025]
What's the difference between Alibaba Cloud International and China site? This article details how international users can register on the International site, payment method setup, main services introduction, pricing and discounts, plus a complete comparison with the China site to help you make the right choice.
Alibaba CloudAlibaba Cloud AI Services: Tongyi LLM, Bailian Platform, DeepSeek Integration Guide
What AI services does Alibaba Cloud offer? This article introduces the Tongyi (Qwen) large language models, Bailian platform, Model Gallery, and DeepSeek integration, with comparisons to AWS Bedrock and GCP Vertex AI.
Alibaba CloudAlibaba Cloud CDN and DNS Tutorial: Acceleration Setup, DDoS Protection Complete Guide
How to configure Alibaba Cloud CDN? This article details DNS resolution services, CDN acceleration configuration, and DDoS protection features to help you improve website speed and defend against attacks, with complete setup tutorials and pricing information.