Chris @ TerrainC
Convex Community13mo ago
3 replies
Chris @ Terrain

Scheduled jobs with large payloads

I receive data at an endpoint. I need to insert this data quickly and respond with a 200. Later, I'll do some additional processing and then write the original data to storage. That helps me keep large documents out of the DB. The trouble is that Convex has a per document limit of 1MB, and my payloads can reach 2-3mb.

An alterative is I write to storage and not to the database. Then enqueue an action to retrieve from storage and write the subset of the data to the database.

Is this all sounding like the correct way to handle things? Is writing to storage fast, dependent on the document size? It's important my API endpoint respond quickly to the caller.
Was this page helpful?