PHP Development API Gateway, forwarding request with curl appropriate? Is there any other way?
Reply content:
PHP Development API Gateway, forwarding request with curl appropriate? Is there any other way?
Curl can be used, but the performance is not known.
PHP has socket support.
The best method Nginx, node.js--high Concurrent asynchronous I/O server
Other such as Erlang, Golang, JVM NiO (Netty vertx) are more appropriate and faster than PHP
In fact, I have not tried, listen to more, "see Pig Run" just, not necessarily all right, hope to help you.
If you feel PHP curl performance is not enough, you can use peak Brother with pure C developed pecl extension swoole Well, in Swoole support, you can use PHP language to implement high-performance asynchronous multi-threaded server.
http://www.swoole.com/
Tiger tooth game live streaming based on php+swoole implementation of TCP long connection push service, only 2 machines to support 500,000 people simultaneously connected online, peak per second push 100,000 messages. Set up a complete push service program, providing mobile online/offline push, message persistence, on-line user and device status management, broadcast task distribution queue, external call API and other functions.