The website is written using Backbone in the background, and the Api uses php to write Restful. It will be very slow to send multiple requests at a time. How can this problem be solved?
The website is written using Backbone in the background, and the Api uses php to write Restful. It will be very slow to send multiple requests at a time. How can this problem be solved?
Reply content:
The website is written using Backbone in the background, and the Api uses php to write Restful. It will be very slow to send multiple requests at a time. How can this problem be solved?
Based on your request time, it can be basically determined that the request is blocked.
There are two types of blocking: client blocking: the browser has a limit on concurrent connections to the same domain name. If this limit is exceeded, then, the browser blocks subsequent requests. This is one of the reasons why there is a dedicated static resource server. The number of connections is limited as follows (reference the number of concurrent request resources allowed by the browser ?) :
From the point of view, the number of connections does not seem to exceed the Max number of connections in Chrome 4 + 6, so it may also be a problem on the server side. The server side is more diversified, but the biggest reason is that you share a single resource, this resource does not implement the concurrency feature. May be your code problems, such as locking to read a file, such as in the nodejs main thread to process synchronization, large computing tasks, may also be the server configuration improperly: PHP-FPM (unix) or PHP-FastCGI (windows) allows a maximum of one instance to process requests frequently, and each request takes a long time.
Sorry, the problem cannot be solved, but you cannot really understand the root cause of the problem according to your description. We recommend that you provide a more detailed description of the problem to be asked next time. At one point, you should take the most important timeline in the whole site and never come in.