Zend 前端控制器

发布于 2024-08-20 08:20:57 字数 234 浏览 4 评论 0原文

我的网站(单个服务器)使用前端控制器模式作为单个入口点,我知道在任何给定时间点仅存在该控制器的单个实例(单例模式) $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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

人间☆小暴躁 2024-08-27 08:20:57

据我了解,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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文