Help with testing session-based architecture across servers

Hey everyone,

I’m working on the ProseMeteor Project and need some advice on how to properly test it. The way it works is by using a session-based architecture, in which when a document is being edited by multiple users (think similar to Google Docs) that document exists in an in-memory session on a single server somewhere that’s been delegated to host that document. Because of this, I’m working on a service-discovery solution at the application level so that when a user wants to edit a document, if a server is already hosting it, the user is given a DDP connection directly to that server.

I’ve seen projects like Gagarin, but I’m wondering what the best approach is to test this specific use case. Each server register’s itself with its IP in a database, and service-discovery is done using those IPs. So I need to be able to test two different servers with different ip addresses hosting documents simultaneously and having clients connect to both of them, and both servers have to be sharing the same Mongo database. So far I’ve been doing it manually by spinning up a VM and starting one server in the VM and one on my host machine, and manually spinning up a Mongo instance to connect them to, but I’d like to do it fully automated if possible.

Any help is appreciated!