Multiple DDP connections from the client to different servers

TL;DR: Are there any stability problems with a client connecting to multiple meteor projects via DDP

I’m considering splitting out some functionality of a project into its own server with its own database.

The portion of the project I’m splitting out contains a lot of documents that get updated regularly, but infrequently (e.g., around 20% of the ~50M documents get updated once per day, 5% may get updated multiple times during the day).

We have 4 meteor projects with overlapping functionality which share this database. However, only 2 of them ever require the section I’m considering splitting out.

The reasons for splitting are three fold:

  1. The access patterns of these collections is very different from our “main” collections. By splitting the collections to a new database on a new replicaset, it allows for smaller servers to maintain the working set in memory for our “main” database.

  2. The servers’ of the two projects that have no use for this data wont have to observe the oplog any more

  3. The servers’ of the two projects that DO use this data won’t be slowed down when the usage of this data is heavy (we are a multi tenant system and we don’t want the users of the system to be impacted by a feature they don’t have access to)

1 and 2 could be accomplished by simply separating the databases - and keeping the servers the same, at the cost of loosing the oplog for this data (which is acceptable for us). However, (3) can only be accomplished by using separate servers.

This is likely the first of 3 such splits in our system we are considering for similar reasons.

Does anyone see any potential problems from a stability point of view? I’ve already tested that if the subsystems servers (or database) are not available the main system functions correctly, and clients can continue using the system - just not the parts that utilise the subsystem.

In terms of backwards compatibility, will this work correctly with websockets and XHR polling - some brief tests I’ve done suggest that it works fine.

Has anyone done this before? Would they do so again?