Cloudflare Resources and Usage
Resources
| Resource | Purpose |
|---|---|
| Workers | APIs, authentication, and web entry |
| Static Assets | Frontend HTML, JavaScript, and CSS storage |
| D1 | Users, messages, groups, settings, and migration records |
| KV | Web sign-in sessions |
| R2 | Attachments, avatars, and site icons; optional |
| Durable Objects | Real-time messaging, call signaling, bridge and notification scheduling |
| Cron Triggers | Delivery recovery every 15 minutes and daily cleanup |
View Usage
Open each resource's Metrics or Analytics in Cloudflare to inspect Worker requests/CPU, D1 reads/writes, KV operations, and R2 storage/requests. Storage statistics in the admin panel groups attachment usage by owner; a manual scan makes R2 list requests.
Web and File Requests
Static Assets stores frontend files. All requests first pass through the Worker's site-setting check; stealth mode also validates sessions. Keep binding = "ASSETS" and run_worker_first = true from the template. See Stealth Mode.
Attachment reads require conversation membership; avatars have separate access rules. Protected files use private caching policies.
Scheduled Tasks
The current template uses crons = ["*/15 * * * *"]. The 19:00 UTC run performs daily message cleanup; other runs handle delivery recovery.
Cleanup is batched and budgeted. Remaining work waits for a later cleanup. See Site Configuration for retention and advanced cleanup parameters.