SwooleÓëNginxµÄÍêÉÆÍŽ᣺¹¹½¨¸ßÐÔÄÜAPIÍø¹Ø
Ëæ×Å»¥ÁªÍøµÄ¿ìËÙÉú³¤£¬¹ØÓÚapiÍø¹ØµÄÐèÇóÒ²±äµÃÔ½À´Ô½ÆÈÇС£ÔÚÒÑÍù£¬apiÍø¹Ø¶à½ÓÄÉÈí¼þ¼Æ»®À´ÊµÏÖ£¬ÕâЩ¼Æ»®¿ÉÒÔ´¦Öóͷ£ÇëÇóºÍÏìÓ¦¿ÉÊǺÜÄÑʵÏÖ¸ßÐÔÄܺ͸߿ɿ¿ÐÔ¡£È»¶ø£¬swooleºÍnginxµÄÉú³¤Ê¹µÃapiÍø¹Ø¿ÉÒÔÔ½·¢ÇáËɵØʵÏÖ¸ßÐÔÄÜ¡£
SwooleÊÇÒ»¿î»ùÓÚPHPµÄÍøÂçͨѶ¿ò¼Ü£¬ÆäÐÔÄܽϹŰåPHPÓ¦Óúá¿çÊý±¶¡£¶øNginxÔòÊÇÒ»¸öÊ¢ÐеÄWebЧÀÍÆ÷£¬ËüÊÇÒ»¸ö¸ßÐÔÄÜ¡¢¸ß¿É¿¿ÐÔ¡¢¶àÓÃ;µÄЧÀÍÆ÷£¬¼È¿ÉÒÔ×÷ΪWebЧÀÍÆ÷£¬Ò²¿ÉÒÔ×÷Ϊ·´ÏòÊðÀíºÍ¸ºÔØƽºâÆ÷¡£Òò´Ë£¬ÍŽáSwooleºÍNginx¿ÉÒÔ¹¹½¨Ò»¸ö¸ßÐÔÄܵÄAPIÍø¹Ø¡£
ÏÖʵÉÏ£¬Ê¹ÓÃSwooleºÍNginx¹¹½¨APIÍø¹Ø²¢²»ÄÑÌâ¡£Ê×ÏÈ£¬ÎÒÃÇ¿ÉÒÔʹÓÃSwooleµÄHTTPЧÀÍÍê³ÉÓªÒµÂß¼µÄ´¦Öóͷ£¡£½Ó×Å£¬Ê¹ÓÃNginxµÄ·´ÏòÊðÀí¹¦Ð§À´½«ÇëÇ󽻸øSwoole´¦Öóͷ£¡£×îÖÕ£¬½«´¦Öóͷ£Ð§¹û·µ»Ø¸ø¿Í»§¶Ë¡£
ÕâÖּƻ®µÄÀûÒæÊǺÜÊÇÏÔ×ŵġ£ÓÉÓÚSwoole¾ßÓкܸߵÄÐÔÄÜ£¬Äܹ»ÊµÏָ߲¢·¢´¦Öóͷ£ÇëÇó£¬ÔÚÇëÇóÁ¿½Ï´óµÄÇéÐÎÏ£¬Ê¹ÓÃSwooleµÄHTTPЧÀÍ¿ÉÒÔÔ½·¢¸ßЧµØ´¦Öóͷ£ÇëÇó¡£Í¬Ê±£¬ÓÉÓÚNginx¾ßÓÐÓÅÒìµÄ·´ÏòÊðÀí¹¦Ð§£¬ËüÄܹ»ÓÐÓõؽ«ÇëÇóת·¢¸øSwoole´¦Öóͷ££¬ÊµÏÖ¸ßÐÔÄÜAPIÍø¹ØµÄ¹¹½¨¡£
±ðµÄ£¬Swoole»¹¾ßÓÐг̡¢Òì²½IOµÈÌØÕ÷£¬ÕâЩÌØÕ÷¿ÉÒÔʹµÃÎÒÃÇÔ½·¢¸ßЧµØ´¦Öóͷ£ÇëÇó¡£Ôڸ߲¢·¢ÇëÇóµÄÇéÐÎÏ£¬Ê¹ÓÃSwooleµÄгÌÀ´Íê³ÉÇëÇó´¦Öóͷ££¬¼È¿ÉÒÔïÔÌ¿ªÏú£¬ÓÖ¿ÉÒÔïÔÌÏìÓ¦µÄÆÚ´ýʱ¼ä£¬ÌáÉýÍø¹ØÐÔÄÜ¡£
×ܵÄÀ´Ëµ£¬Ê¹ÓÃSwooleºÍNginxÍŽṹ½¨¸ßÐÔÄܵÄAPIÍø¹ØÊÇÒ»¸öºÜÊDz»´íµÄÑ¡Ôñ¡£ÍŽáÁ½ÕßµÄÓÅÊÆ£¬Äܹ»µÖ´ï¸ü¸ßµÄÐÔÄܺ͸üºÃµÄÓû§ÌåÑ飬ÕâΪAPIÍø¹ØµÄÉú³¤ÌṩÁ˸üºÃµÄÔ¶¾°¡£
ÒÔÉϾÍÊÇSwooleÓëNginxµÄÍêÉÆÍŽ᣺¹¹½¨¸ßÐÔÄÜAPIÍø¹ØµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡