Dealing with high number of real-time calls to partner API in Rails -


Is received on the action of. I will have to pass in the request-specific parameters (such as IP, User-agent, etc.) for the Partner API and I will return the returns the user receives. Since the call to Partner API is very user-specific, I can not cache the response coming back from the participant API (like in a memcatch). I need to answer the user in 1500ms or less.

My rail app is killing the wall in the context of requests / conditions, because the partner AP returns a response to each mangalal. In a recent demonstration test, I saw that the server only takes out 5 requests / seconds (5 mongolas running).

I have some solutions to do that:

1) Make the Partner API respond faster. Actually, I can only drag this lever - from the partner In fact, with the hard work, the average reaction time is 200 min.

2) As long as I wait for the Partner API to come back, I try to use Rails :: Timeout, but it allows the waiting period in multiples of only one second. Can it be time-bound for this?

3) Is there a way to call the Partner API, do they have to execute asynchronous? In Java, I used thread for the same function.

Thank you for your help!

You can delay to choose every other database, so the work is done quickly Then use any column in your database to vote for the result.

Example:

  1. Add a Job for a Delay Job
  2. Redirect User Results Page
  3. Some Types
  4. Display a progress indicator of (maybe the arrow rot)
  5. Voting that database column / row / via any other action for whatever result

This user Will give feedback, and allow them to wait to think without time.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -