他的回复:
Floors 2 and 3 already give a good framework (ratio first, shared vs dedicated, disk and bandwidth, billing, then tune with CES). Three things I would add from running my own small server - the one I hardened with fail2ban and tuned with BBR - because they are the points where the framework meets reality.1. Judge by percentiles, not by peaks. A single spike to 90% CPU during a deploy tells you nothing. In Cloud Eye (CES), look at 7 days of data and take the 95th percentile: if p95 CPU is under 30% for a week, drop one tier; if it is over 70% at p95, go up a tier or split the service. And check swap first: any swap usage at all means you are short on memory, and adding CPU will not fix it - add memory first, then re-measure.2. The bottleneck is often not CPU or memory at all. On my own low-spec server the CPU sat idle while image downloads crawled - the limit was outbound bandwidth, not compute. Before you buy a bigger instance, check the four CES curves together: CPU, memory, disk I/O and network out. If network out is the flat line at the top, put the static content behind a CDN instead of upsizing the ECS; that is usually cheaper than a larger instance and it also takes the load off the server.3. Price the whole bill, not just the instance. A 2-core 4 GB instance looks cheap until you add an EIP with bandwidth, a 100 GB system disk and weekly snapshots. Run the price calculator with all four lines, and compare the same total for pay-as-you-go, 1-year and 3-year reserved prices. For a workload that runs 24 hours a day, the reserved price often beats a smaller pay-as-you-go instance.4. Plan the change itself. ECS lets you change flavour, but a CPU/memory change normally needs a shutdown and reboot. Do it in a low-traffic window, take a snapshot of the system disk first, and verify the service comes back on its own after the reboot (check that fail2ban, nginx or whatever you run is enabled to start on boot) - the most common post-change incident is a service that was started by hand months ago and never set to auto-start.5. Load-test before you commit to a year. Use a simple tool such as ab or wrk and ramp concurrency 10, then 100, then 500, watching CPU steal time on a shared instance. Sustained steal above about 5% means your neighbours are eating your CPU and you should move to a dedicated flavour rather than a bigger shared one. A 30-minute test on a pay-as-you-go instance is cheaper than a year of the wrong size.