Spotinst is a service (Israeli one) that takes the responsibility of the whole termination issue on spot instances. It recognizes a spot instance just before it gets terminated, saves all its data, provision a new spot instance, brings back all the data that was on the old instance, and just makes it look like nothing happened. The IP stays the same, the machine name stays the same.
On Spotinst, there is an ‘Elastigroup’ (there are more features that Spotinst offers, but let’s focus on this one for now) that behaves very similarly to an Auto-scaling group. You set a minimum, maximum, and s desired number of instances you want to keep alive. This Elastigroup will make sure that you’ll always have the number of instances you have mentioned, without losing data.
Spotinst services cost money, but still after that, it is cheaper than a normal EC2 instance.