Zend 前端控制器
我的网站(单个服务器)使用前端控制器模式作为单个入口点,我知道在任何给定时间点仅存在该控制器的单个实例(单例模式) $frontController = Zend_Controller_Front::getInstance();
令我惊讶的是,如果我在高峰时间收到并发请求/流量(假设某个很大的数字),控制器的这个单个实例是否会扩展并处理所有请求,而不会影响客户的响应时间。为什么不能创建一个控制器实例池来扩展流量?
谢谢
My website(a single server) is using front controller pattern as the single entery point and I understand that only a single instance of this controller exist at any given point of time (Singleton pattern)
$frontController = Zend_Controller_Front::getInstance();
What surprises me is if I get concurrent requests/traffic(assume some big number) at peak times, will this single instance of the controller scale up and handle all the requests without effecting the resonse times to the customer. Why can't a pool of controller instances be made so that it scales up to the traffic?
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我了解,PHP 为每个请求创建一个全新的环境,因此每个请求都会在其自己的环境中得到自己的单独的单例前端控制器沙箱。
As I understand it, PHP creates a brand new environment for every request, so each request will get its own individual singleton front controller sandboxed inside its own environment.