Implementing a PHP API Gateway Based on Microservices Architecture
Wen-Tin Lee, Ming-Kai Tsai · 2024
Managing the complexity of microservices and ensuring that they work together effectively is a challenge. To effectively solve this problem, the API Gateway design pattern was derived during implementation. This study proposed a high-performance PHP API Gateway called Anser-Gateway based on microservices architecture with event loop and coroutine mechanisms. Compared to existing solutions, our API gateway framework leverages the cooperative scheduling provided by the coroutines and event loop, making the overall framework more efficient in handling each request, resulting in high throughput performance.