The r7g.4xlarge pairs 16 vCPU with 128 GiB of RAM, the 8.00 GiB-per-vCPU ratio that marks a memory-optimized instance. In the name, "r" stands for RAM, "7" is the generation, "g" marks AWS Graviton (ARM) processors and "4xlarge" is the size within the r7g family. It runs on AWS Graviton3 Processor at 2.5 GHz, and AWS introduced it in February 2023. AWS has since shipped r8g and r9g; r8g.4xlarge is the direct replacement at this size, scoring 476,013 CoreMark/s against this instance's 411,073 — roughly 16% more throughput for the same vCPU count. mh.vs1.2xlarge on Rackspace Spot lines up one-for-one: 16 vCPU and 128 GiB, $0.857/hr on AWS in US East (N. Virginia), from $0.021/hr on Rackspace Spot.
Match qualityx86 substitution
r7g.4xlarge is Graviton (arm64). Rackspace Spot does not have arm64 servers, so mh.vs1.2xlarge is an x86_64 substitute with similar specs.
You will need x86 builds of your container images. Most software rebuilds without changes, but anything with compiled native code needs a real rebuild rather than a retag. Speed per core also differs between the two chips, so it is worth testing before deciding how many nodes to run.