In general, downlink messages are queued before the uplink message is sent. This way we don’t have to lose time waiting for an application. Messages have to travel through multiple components, and might come from a gateway halfway across the world, so we need to keep this wait time as low as possible.
We do understand that some applications might require sending an immediate reply, so we allow for a short wait time of 100ms. If your application takes 500ms to respond, the downlink will have missed this window, and will be scheduled for the next opportunity.
To minimize the delay caused by network latency, we recommend to place your application server close to the Handler (Ireland for eu
, California for us-west
, Sao Paulo for brazil
, Singapore for asia-se
). To minimize the response time of your application, we recommend to send a response as soon as possible. Many processing steps in your application can be postponed until after sending the downlink back to the network.
Good luck!