英文:
Does the Request Per Second (rps) depends on framework/language?
问题
我对影响 RPS(每秒请求数)的因素感到困惑。
有人说,Django 在处理大量并发请求时较慢,而 Node.js 或 Golang 的性能更好。
在哪种情况下,RPS 会达到最大值,为什么?
- 在没有使用 Nginx 的 VPS 上托管的 Django 应用
- 在使用 Nginx 的 VPS 上托管的 Django 应用
- 在没有使用 Nginx 的 VPS 上托管的 Express 应用
- 在使用 Nginx 的 VPS 上托管的 Express 应用
另外,我创建了一个 Express 项目,如果我用 go-fiber 重新创建该项目,性能差异会有多大,我的应用的哪些方面会得到改善,为什么?
提前感谢。
英文:
I'm confused regarding what are the factors which affects the rps.
some say, django is slow as cannot handle a lot of concurrent request while the performance is more in node or golang.
in which scenario in the rps going to be maximum and why.
- django app hosted on a vps without nginx
- django app hosted on a vps with nginx
- Express app hosted on a vps without nginx
- Express app hosted on a vps with nginx
also i've created an express project and if i'm recreating the project in go-fiber, how much performance difference is going to be there and which aspect of my app are going to improve and why.
thanks in advance
答案1
得分: 1
在开始任何项目时,不要考虑性能,而是要考虑项目的健康和安全,以及快速进入市场/生产。
从你提出的四个选项中,答案将是:
使用nginx/appache/caddy托管的Express应用程序。
nginx/appache/caddy可以执行许多任务,包括缓存。这使得你的应用程序更快。
这并不意味着Django很慢。Django仍然足够快。重要的是选择你擅长并享受开发的技术。
最后,Go应用程序将是最快且最安全的。
首先,因为它是一种静态类型语言,这使得它具有速度和安全性。
其次,因为它是一种编译语言。这使得它具有速度和稳定性。
还有,它可以自动利用所有可用的核心(CPU),而使用其他语言则会很复杂。
英文:
When starting any project, don't think about performance. Think about the health and safety of the project and also about quick access to the market/production
From the four options you put forward, the answer will be:
Express app hosted with nginx/appache/caddy.
nginx/appache/caddy performs a lot of tasks, including the cache. This makes your application faster.
This does not mean that Django is slow. Django is still fast enough. The important thing is to choose the technology you are good at and enjoy development with.
Finally Go apps will be the fastest and safest too.
First, because it is a static type language, This gives speed and safety.
And because it is a compiled language. This gives it speed and stability.
And because it uses all available cores (cpu) automatically, With other languages, exploiting all the available cores would be complicated.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论