在 Apache 上使用 Comet/Orbited 构建 Django 应用程序,使用 mod_wsgi 还是 mod_python?

发布于 2024-08-08 18:57:10 字数 880 浏览 2 评论 0原文

在 VPS 上构建 Django 应用程序。我对设置自己的服务器不太有经验,但这次我决定尝试一下 VPS。

我一直在做大量研究来学习如何使用 Apache Worker MPM“正确”设置 LAMPython 服务器。自然地,出现了 mod_python 与 mod_wsgi 的争论。

阅读 Graham Dumpleton 的博客和他的各种邮件列表回复,我学到了很多东西。特别是,通过使用工作器 MPM 可以大大提高 mod_python 的性能 - 如 mod_python 中的负载峰值和过多的内存使用

不管怎样,我决定使用 mod_wsgi(守护进程模式)+worker MPM,但后来我开始考虑实现 Comet,我有点困惑。

我正在考虑使用 Dark Porter 描述的技术来实现 comet ( http://darkporter.com/?p=7 )因为看起来它通过将所有内容都集中在一个进程中来进一步优化 django 设置,但他特别说他使用 mod_python 并且没有提及 mod_wsgi。

所以我的问题是:

1)是否可以使用 mod_wsgi 实现 Dark Porter 的方法?

2) 如果您要设置服务器来支持 Django+Comet,您会使用哪些组件以及为什么? (mod_python vs mod_wsgi / DarkPortersMethod vs MorbidQ vs RabbitMQ)

谢谢

Building a Django app on a VPS. I am not very experienced with setting up my own server, but I decided to try a VPS this time around.

I have been doing a bunch of research to learn how to "properly" setup a LAMPython server using the Apache worker MPM. Naturally, the mod_python vs mod_wsgi debate came up.

Reading Graham Dumpleton's blog and his various mailinglist responses, I've learned quite a bit. Particularly, that the performance of mod_python could be greatly improved by using worker MPM - as described at Load spikes and excessive memory usage in mod_python

Regardless, I had decided to go with mod_wsgi(daemon mode) + worker MPM, but then I started looking into implementing Comet and I got a bit confused.

I was considering implementing comet using the technique described by Dark Porter ( http://darkporter.com/?p=7) because it looks like it optimizes the django setup a bit more by having it all in one process, but he specifically says that he uses mod_python and makes no mention of mod_wsgi.

So my questions:

1) Is it possible to implement Dark Porter's method using mod_wsgi?

2) If you were setting a server to support Django+Comet, what components would you use and why? (mod_python vs mod_wsgi / DarkPortersMethod vs MorbidQ vs RabbitMQ)

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

甜`诱少女 2024-08-15 18:57:10
  1. 是的,绝对。

  2. 我可能会使用由 Dark Porter 实现的 Orbited - 这是让代码运行的最简单的解决方案,并用纯 python 实现。更不用说,基于 Twisted,因此非常可扩展,并且拥有完善的 Django 用户社区。

  1. Yes, absolutely.

  2. I would probably use Orbited as implemented by Dark Porter - It's the simplest solution to get your code running, and implemented in pure python. Not to mention, based on Twisted and thus very scalable, and has a well-established community of Django users.

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