N
N
Nikolai2017-01-10 11:43:48
Android
Nikolai, 2017-01-10 11:43:48

How to increase the speed of the request to the api?

We make a mobile application using the data of a third-party service through api. The service has a requirement - to make requests from a limited number of allowed IP addresses.

To fulfill this condition, we first send a request from the mobile application to our hosting with an approved IP address, then we make a request to the API with a script, and only then back to the application from there. As a result, the data is loaded for a very long time.

Question - how much does hosting power affect this operation? Is it possible to somehow more effectively implement a link with api or bypass restrictions on IP addresses?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
3
3vi1_0n3, 2017-01-10
@3vi1_0n3

Have you considered doing caching on your hosting?
The power of hosting has little effect here, the way the data passes is more affected.
It makes sense to look at the timeouts when requesting data from a service from your hosting, how long it takes to process a request from a client on your hosting, and so on, and think based on this.
You can implement it more efficiently using proxying, without processing data with your own scripts, but since it is not clear what kind of data, in what form, and what your service does with it, it is not known whether this can be done.
For example, you generate the page yourself, and simply proxy the data so that the client receives, say, JSON (or XML), and processes it on the client side via AJAX.

I
Igor Kalashnikov, 2017-01-10
@zo0m

Where is the 3rd party API and your server physically located? Try moving your server closer. Maybe you can cache requests to a third-party API and not send in all cases?
Hosting power is unlikely, you just forward requests further, the number of connections that your server can hold is important to you, but still write what kind of machine you are using, and what kind of technology are you using? (for this task, NodeJS seems fine to me)
About the cache: depending on the situation, you can separately pull data into your database and process it there

P
Puma Thailand, 2017-01-10
@opium

strongly affects if there are not enough resources or the server is very far from each other, if not, then it does not affect at all.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question