Start a new topic

Is there a way to guarantee an endpoint responds within 2 second window?

My endpoint is getting pretty complicated with rankings and data merging. I'd like to use setTimeout function so that wherever my computation is at, it ends and returns whatever results have been computed. But setTimeout is not supported.

Can you provide an example of what you are trying to do and what you want to use setTimeout to achieve? Also - we do offer plans that have higher BL Execution timeouts if that would be more suitable for your use case.
When I get back 100 records in BL, I do a bunch of processing on the data - calculate popularity, reorder some things, etc. I don't have to do all the computation and return 100 records, it would be ok to just return 50 if time ran out.

Another solution would be for Kinvey to provide an initialized timer with the BL. We could then test elapsed time and cleanup and exit before time runs out.
The best thing to do is try to look for efficiencies in your BL, and use the async module where possible. Many times, these manipulation functions can be optimized to fit well within the 20-second timeout.
I'm on the 2 second timeout plan!
Sorry - that was just a typo. I meant 2-seconds.
If I use Google App Engine, do I still have a 2 second timeout?
Login or Signup to post a comment