How Connecfy Works
The short version: there is no persistent connection between Connecfy and your phones. Every gateway asks for work on a timer. Understanding that one fact explains almost everything about Connecfy's timing and failure behavior.
Polling, not push
When your app calls POST /api/v1/sms/send/, the message is written to the queue with status queued and the request returns immediately — nothing is sent yet. The gateway behind the target SIM polls Connecfy roughly every 20 seconds asking "anything for me?" That poll is the only moment a queued message can move. There's no SMPP session, no push channel, no way to shortcut this — the average time from API call to a message being picked up is about 10 seconds, worst case just under 20.
A phone reports its own health the same way: a heartbeat call roughly every 15 seconds carrying battery level and signal strength. If 45 seconds pass with no heartbeat, the dashboard marks that SIM offline — not because Connecfy detected a disconnect event, but because it stopped hearing from it.
Claiming a message
Each poll can claim up to 50 queued messages atomically — the database locks the rows it hands out (SELECT … FOR UPDATE SKIP LOCKED) so if you run more than one SIM on the same account, or a poll retries after a slow response, two gateways can never both pick up the same message. Once claimed, a message moves to sending and belongs to that device until it reports back.
ThroughputOne SIM's practical ceiling is roughly 50 messages × 3 polls/minute — a few hundred messages a minute, not a hard platform-wide cap. Sending a large batch faster than one SIM can drain it just means it queues across more poll cycles; spreading the batch across more SIMs raises the ceiling linearly.
What happens if a phone drops mid-send
A message claimed by a phone that then loses power, loses its SIM, or crashes would stay stuck in sending forever if nothing intervened. Connecfy doesn't run a background sweep for this — instead, every time any of that account's devices polls for new work, Connecfy first checks for that account's own messages that have been claimed for more than 3 minutes without a status report, and puts them back in the queue. This happens automatically, up to 3 times per message; after that it's marked failed. See Message Lifecycle for the full state diagram.
Sending before you own a SIM
If your account has no SIM of its own, sends are routed automatically to Connecfy's shared platform pool — the same polling and claiming mechanism, just against phones Connecfy operates rather than yours. This exists so you can integrate and test immediately; most accounts running real volume connect their own SIM for control over the sending number and dedicated throughput. See SIM Cards.
Receiving works the same way, in reverse
An SMS arriving on a connected SIM is picked up locally and reported to Connecfy on the gateway's next check-in — there's no separate "inbound poll," it rides the same heartbeat cycle. See Receiving SMS for what's implemented today and its one real limitation.