You’re in essence looking for a cluster. There was significant talk of this starting in 2015, and it died off in 2017.
In theory, you could possibly do it, by using an OS that supports clustering. I believe that Ubuntu supports clustering, but I’ve never done it.
In practice, you may find you need additional hardware to speed up communication between the two clustered systems. That’s outside of my understanding.