I'd go with ECC RAM even if it costs a little bit more, same with an enterprise NVMe SSD. The latter is worth it in case of a power cut. It allows you to enable write cache and using the SSD as ZFS cache, massively increasing performance if you are using mechanical HDDs. This guy goes full SSD, but for the content he serves that isn't required at all.
Also, just have enough RAM, but don't disable swap. Put swap on an enterprise SSD but let Linux handle it. It will do so cleverly. Whereas with RAM only you cannot use swap at all. Minor disadvantage is you should encrypt your swap. But with modern hardware that shouldn't be a large penalty.
Also, just have enough RAM, but don't disable swap. Put swap on an enterprise SSD but let Linux handle it. It will do so cleverly. Whereas with RAM only you cannot use swap at all. Minor disadvantage is you should encrypt your swap. But with modern hardware that shouldn't be a large penalty.