In theory it's quite easy. I'd just need a distributed file system with caching (there are quite a lot lol https://en.wikipedia.org/wiki/Comparison_of_distributed_file_systems). And then I need to run the application on both servers and keep them in sync. Idk how good Nextcloud can handle this. The client has to decide to which server it connects.
I am looking for some examples now
One of the first Mastodon instances, there is no specific topic we're into, just enjoy your time!