Hello @Jeffrey K ,
this is an interesting question and there is no simple answer.
In your Azure subscription, you can create up to 50 IoT Hubs and up to 10 Device Provisioning Services.
Each DPS can connect to up to 50 IoT Hubs. There are also limitations regarding number of enrollments per DPS, number of device registration, number of messages per second etc.
So, there are physical limitations you have to take into account (some are soft limits, you can ask Microsoft for even more resources).
On the other hand, the logical distribution is probably more important.
It depends how you want to split the devices:
- splitting DEV/TEST/ACCEPT/PROD
- Splitting messages from multiple projects or customers so you can monetize it better
- You do not want to mix data from a security perspective or government or legal requirements.
- etc.
Probably, some of these choices are hard at this moment. Perhaps you want to start small and cheap and see how it goes.
The good news is that most of the time you can still migrate (groups of) devices at any point of time. The DPS device allocation policy can be used for that, even with custom logic using Azure Functions.
There are two thing that will limit you over time:
- The way the device connects to the cloud, using a DPS or directly to an IoT Hub. Once the device is past the moment where it gets its security keys, you cannot change that remotely at scale.
- The tags (not) given to a device or a device enrollment. Without proper Device Twin tags, it is hard to identify and modify both groups of devices or even a single device.
So, make sure your devices are able to reprovision themselves and no valuable telemetry is not lost when reprovisioning. Then, you can regroup at any given time.