@Vithushan Varatharajan If you are looking for specific to IoTHub, below will help.
IoT Hub enforces an 8 KB size limit on the value of tags, and a 32 KB size limit each on the value of properties/desired and properties/reported. These totals are exclusive of read-only elements like $etag, $version, and $metadata/$lastUpdated.
Twin size is computed as follows:
- For each property in the JSON document, IoT Hub cumulatively computes and adds the length of the property's key and value.
- Property keys are considered as UTF8-encoded strings.
- Simple property values are considered as UTF8-encoded strings, numeric values (8 Bytes), or Boolean values (4 Bytes).
- The size of UTF8-encoded strings is computed by counting all characters, excluding UNICODE control characters (segments C0 and C1).
- Complex property values (nested objects) are computed based on the aggregate size of the property keys and property values that they contain.
IoT Hub rejects with an error all operations that would increase the size of the tags, properties/desired, or properties/reported documents above the limit.
At any given time, you can increase quotas or throttle limits by increasing the number of provisioned units in an IoT hub.
Please refer the below documentations for more details.
Understand and use device twins in IoT Hub and IoT Hub quotas and throttling
If the response is helpful, please click "Accept Answer" and upvote it.