可以使用PHP-FPM来管理队列使用者吗?

There's a beanstalkd queue, which gets filled with a lot of tasks say every 10 minutes and it is top priority that each task is processed ASAP. Task can take more that a few milliseconds to complete for there are calls to third-party services, which tend to timeout every now and then.

So since PHP doesn't have multithreading, one option would be to create a lot of idle workers, which would try to reserve a task, but it is likely to take too much RAM, which may not be available on those boxes.

Is it a good idea to use PHP-FPM to adjust the number of workers and save some RAM? Is it production-ready? Are there better solutions?

Thanks

查看全部
doucitao2944
doucitao2944
2011/10/27 08:34
  • php
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

2个回复