Failures and scaling
What happens when the agent, a product, PayPal or a notification fails, and how App grows.
| When | What happens |
|---|---|
| The agent does not answer | your message is kept; App says so and tries again for 10 minutes, then offers Retry |
| The connection drops mid-answer | the interface reconnects and continues from the last part it received |
| A product does not answer | its board card shows the last known values and when they were read; the chat says which product is not answering |
| PayPal’s confirmation is late | the capture result adds the credits; if neither arrives, App checks again every 5 minutes for 24 hours, then marks the top-up failed |
| A product reports spending twice | the ledger writes each entry once, by its key |
| A notification cannot be delivered | it is retried, then sent by e-mail |
| Messages pile up in a queue | a dead-letter queue keeps them and raises an alarm |
Scaling
The API holds no state between requests; Postgres is the only state. Each answer is its own stream. The board’s 60-second cache and the limit of messages per session keep one busy project from slowing others.