If I launched a SPOT instance with Max price = on demand price. I get huge cost savings because I will pay the current spot price which can go upto the on demand price. Also, the instance will never be terminated since spot price cannot exceed on demand price. So, why will I ever launch an on demand instance and pay for the on demand price.
Basically, what is the advantage of on demand instance over a spot with max price = on demand price?
You are right and I use this strategy ALL the time with non-critical workloads. Because I’m not using volatile instances types like the big ones or the GPU ones, I usually realize about a 70-80% savings over On-Demand. The risk is that I have seen some cases where Spot prices will move higher than On-Demand prices…it might happen in one AZ or all of them. It’s rare but it does happen. I usually set me Spot quite a bit higher than on-demand just as a safety margin. AWS lets you set a spot price up to 10x the on-demand price.
The second thing that might happen is capacity constraints in an AZ or Region. There is a set portion of on-demand ear-marked resources set aside to ensure that on-demand people get the resources they need when then demand them. Spot resources are a lower tier and can loose out on starting or restarting if there is a constraint. This has happened to me in the past with crowded regions on relatively common instances like the M, C and T instance types.
Overall, I like the strategy for disposable instances but not for production stuff.