Menu

Expand
Rate this page:

Sync Limits

In order to guarantee good quality of service across for all your customers across all your apps, Sync applies rate limits to the actions (reads and writes) taken by your code in the running app. Note that state fanout—the delivery of realtime updates to your app when it is subscribed to a Sync object—is neither a read action nor a write action, and therefore we do not limit the rate of delivery to subscribers.

The following tables summarize the various rate limits that apply.

Connection Limits

Limited Quantity Prescribed Limit Notes
Number of
Standing Connections

up to 7,000
in each Twilio Subaccount

and

100,000 overall, shared among all your subaccounts.

Contact sales for more information or to request an override.

Rate of
Connection Establishment (new or re-established)

up to 110/s
in each Twilio Subccount

and

1,000/s overall, shared among all your subaccounts.

This applies across all subaccounts. Contact sales for more information or to request an override.

Rate of
Upstream Requests

up to 500/s
per connection

and

up to 20,000/s
per Subccount

Contact sales for more information or to request an override.

Sync Activity Limits

Limited Quantity Prescribed Limit Notes
Rate of
Object Writes
up to 20/s per object
burst window: 10s
  • An object write is an explicit request in your code to change a value stored in Sync.
  • The limit applies at the top level of each Document, Map, and List, e.g. updating any item in a Map still counts towards the containing Map's write rate.
  • Fanout to subscribers is not rate-limited. If a write is accepted, all online subscribers will receive a state update and their number is inconsequential to the object's read or write usage.
  • Objects larger than 1KiB are rate-limited more aggressively. The most strict rate limit, applicable for payloads 10KiB and larger, is 2 writes/s sustained.
Rate of
Object Reads
up to 20/s per object
burst window: 10s
  • Object reads are effectively GET requests for Sync data. These usually occur when initializing your Sync app. Fanout of state updates to an online subscriber does not count as a read.
  • The limit applies at the top level of each Document, Map, and List.
  • When requesting List or Map items en masse, each requested page counts as one read.
Rate of
Stream Messages
up to 30/s per stream
burst window: 10s
  • Fanout to subscribers is not rate-limited. If a message is accepted, delivery will be scheduled for all subscribers.
  • Delivery is not guaranteed, and occurs independently of the message's acceptance from the sender. If a receiver fails to accept a message within a few seconds of acceptance, Sync will silently drop that message for that subscriber.
  • Messages larger than 1KiB will be rate-limited more aggressively. The most strict rate limit, applicable for payloads larger than 3KiB, is 7 messages/s sustained.
Rate of Object Permission Reads and Writes

up to 80/s per object permission

burst window: 10s

  • These limits apply to all permissions on an individual Sync object (except Sync Streams) and are separate from the main read and write limits. The limits will be enforced only if ACLs are enabled for service instance associated with your application.
  • Object permission reads are GET requests for Sync object identity where every individual identity can have various permissions for different Sync objects.
  • Object permission writes are POST and DELETE requests for Sync object identity where every individual identity can have various permissions for different Sync objects.
Rate of
Live Queries

up to 200/s per index per service instance

up to 20/s per index per client identity

burst window: 10s

  • Establishing a new Live Query fetches a dataset with filters applied and is rate controlled.
  • Live Query global rate control applies per individual index within a single Sync service instance.
  • Live Query client rate control applies per client identity established by Sync SDK.
Number of
Sync Objects
Unlimited
  • You can create at most 20 objects per second, per Sync service. Important to mention, delete operations are counted into 20 objects per second limit.
  • Deleting objects is free if this action is triggered by TTL, and not subject to any rate limit.

Sync Payload Limits

Limited Quantity Prescribed Limit Notes
Size of Document payload 16 KiB Sync Documents may contain payloads up to 16 KiB of valid JSON serialized to a UTF-8 string.
Size of List Item payload 16 KiB Sync Lists may contain Items with payloads up to 16 KiB of valid JSON serialized to a UTF-8 string.
Number of Items in the List 1,000,000 Sync Lists should not contain more than a million of items.
Size of Map Item payload 16 KiB

Sync Maps may contain Items with payloads up to 16 KiB of valid JSON serialized to a UTF-8 string.

NB! Due to some accidents of serialization and deserialization, which we do in the process of ensuring valid JSON payloads, the actual data written may be of subtly different size than it is upon transmission. In these cases, you may find payloads being rejected "too large" as they approach the 16KB limit. If your application stores large payloads, please do test at the extremes.

Number of Items in the Map 1,000,000 Sync Maps should not contain more than a million of items.
Size of Stream Message 4 KiB Sync Message Streams may deliver payloads up to 4 KiB of valid JSON serialized to a UTF-8 string.
Length of Unique Name 320 characters Unique names assigned to Documents, Lists, Maps, Message Streams may contain up to 320 characters (UTF-8).
Length of Identity 256 characters Client identity may contain up to 256 characters (UTF-8).
Default Page Size 50

By default, this will return the first 50 items. Specify a PageSize value to fetch up to 100 items at once. There is no difference if the flag IncludeItems enabled or not. See paging for more information.

Default sorting order is ascending of ListItems per itemIndex and Map Items per item Key.

TTL limits An integer from 0 to 31,536,000 (one year)

The default value is 0, which means the Sync object does not expire.

The Sync object will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion.

Sync Insights Client Limits

(Currently for Flex customers only)

Limited Quantity Prescribed Limit Notes
Number of active LiveQueries per SDK client 2000 The number of active Sync LiveQueries initiated and tracked by a single SDK client instance must not exceed 2000.
Number of items returned by LiveQuery / InstantQuery 200 Max number of items included into the LiveQuery / InstantQuery search result.

For the LiveQuery the returned result set can subsequently receive updates whenever new (or updated) records would match the given expression therefore the number of items can grow beyond the limit until this query is explicitly closed.
Number of operators in query expression 30 Query expression may contain any combination of the following operators: and, or, in, eq, not_in, not_eq, contains, however overall number of operators in query expression must be less than 30.
Array size in query expression 30

Any array within query expression must contain less than 30 elements.

Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting our Twilio Community forums or browsing the Twilio tag on Stack Overflow.

        
        
        

        Thank you for your feedback!

        We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

        Sending your feedback...
        🎉 Thank you for your feedback!
        Something went wrong. Please try again.

        Thanks for your feedback!

        Refer us and get $10 in 3 simple steps!

        Step 1

        Get link

        Get a free personal referral link here

        Step 2

        Give $10

        Your user signs up and upgrade using link

        Step 3

        Get $10

        1,250 free SMSes
        OR 1,000 free voice mins
        OR 12,000 chats
        OR more