LordSilver
LordSilver2w ago

yeh but where does the code run?

yeh but where does the code run?
3 Replies
erquhart
erquhart2w ago
Scheduled functions run in your deployment, same as regular functions. Storage is just api’s for upload/serve/etc Convex functions are serverless functions. Normally they’re invoked from the client. For your mental model, you can think of scheduled functions as being invoked via cron. But either way it’s a serverless function that runs at invocation and not before. This is where it’s helpful to remember that Convex isn’t a database, it’s a backend-as-a-service that has a database.
LordSilver
LordSilverOP2w ago
i meant when u self-host the convex functions are run inside your EC2, not as lambda functions so they run in the same space as the db
erquhart
erquhart2w ago
ah you're self hosting, so you already know more than I do about Convex's architecture. EC2 sounds closer to what the cloud arch is too as the team says code effectively executes "inside the database". If you're running Convex in EC2, the functions would be executed there when the scheduled time arrives, same place the code runs when a client calls a function. Maybe I'm not understanding the question? Relevant: https://discord.com/channels/1019350475847499849/1216859935288201296/1343409024946802798 Works the same as cloud as far as scheduler is concerned

Did you find this page helpful?