Chat app example

Use this real-world example of a basic chat app to gauge your PowerSync usage and costs, on the Pro plan of PowerSync Cloud. This is not an exact estimate, but it can help you better understand how your PowerSync usage would be billed on the Pro plan.

This use case has the peculiarity that all data is user-generated and necessarily shared with other users (in the form of messages). More typical use cases might sync the same server-side data with many different users and have less user-generated data to sync.

Overview: Costs by usage (Pro plan)

To illustrate typical costs, consider an example chat app, where users can initiate chats with other users. Users can see their active chats in a list, read messages, and send messages.

For this app, all messages are stored on a backend database like Postgres. PowerSync is used as a sync layer to make sure users see new messages in real-time, and can access or create messages even when their devices are offline.

Assumptions

User base assumptions:

  • Daily Active Users (DAUs) are 10% of total app installations. These are the users that actively open and use your app on a given day, which is typically a small subset of your total app installations. For the calculations below, we estimated DAUs as 10% of the total number of app installations. We use this assumption as an input to calculate the total number of messages sent and received every day.
  • Peak concurrent connections are 10% of DAUs. This is the maximum number of users actively using your app at exactly the same time as other users, which is typically a small subset of your Daily Active Users. For the calculations below, we estimated peak concurrent connections as 10% of the total number of app installations.

Data size, transfer and storage assumptions:

  • Messages are 0.25 KB in size on average. 1KB can store around half a page’s worth of text. We assume the average message size on this app will be a quarter of that.
  • DAUs send and receive a combined total of 100 messages per day, generating 100 rows in the messages table each day**.**
  • Message data is only stored on local databases for three months. Using PowerSync’s sync rules, only messages sent and received in the last 3 months are stored in the local database embedded within a user’s app.
  • No attachments synced through PowerSync. Attachments like files or photos are not synced through PowerSync.
  • One PowerSync instance. The backend database connects to a single PowerSync instance. A more typical setup may use 2 PowerSync instances: one for syncing from the staging database and one for the production database. Since staging data volumes are often negligible, we’ve ignored that in this example.

Table of Assumptions

DAUs as % of all installs10%
Peak concurrent connections as % of DAUs10%
Messages sent and received per day per DAU100
Message average size0.25 KB
Messages kept on local database for3 months (90 days)

For 50,000 app installs (5,000 Daily Active Users): $56/month on the Pro plan

Data Processing

Data replicated from Postgres to PowerSync service / month100 messages / day * 5,000 DAUs * 0.25 KB * 30 = 3.75 GB / month
Data replicated from PowerSync service to app / month100 messages / day * 5,000 DAUs * 0.25 KB * 30 = 3.75 GB / month
Total data processing costs / month
Usage:3.75 GB + 3.75 GB = 7.5 GB
Less included usage:(30 GB)
Cost for additional usage:$0
Total usage costs$0

Sync operations

Total sync operations / month100 messages / day * 5,000 DAUs * 30 = 15,000,000 sync operations / month
Total sync operation costs /month
Usage:15,000,000
Less included usage:(10,000,000)
Cost for additional usage:5,000,000 * $1/1,000,000
Total usage costs$5 / month

Replicated data cached on PowerSync service

Total size of replicated data to be cached and synced100 messages / day * 5,000 DAUs * 0.25 KB * 90 days = 11.25 GB
Total replicated data caching costs / month
Usage:11.25 GB
Less included usage:(10 GB)
Cost for additional usage:2 GB * $1 / GB
Total usage costs$2 / month

Peak concurrent connections

Total number of peak concurrent connections5,000 DAUs * 10% = 500 peak concurrent connections
Total peak concurrent connections costs / month
Usage:500
Less included usage:(1,000)
Cost for additional usage:$0
Total usage costs$0 / month
Total monthly costs
Pro Plan$49 / month
Data processing$ 0 / month
Sync operations$ 5 / month
Replicated data caching$ 2 / month
Peak concurrent connections$ 0 / month
Total monthly costs$56 / month