加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

SQLite作为低流量站点的生产数据库?

发布时间:2020-12-12 19:17:39 所属栏目:百科 来源:网络整理
导读:我正在考虑使用SQLite作为一个网站的生产数据库,将接收大约20个同时的用户,但潜在的峰值可能是其中的许多倍数(因为该网站将在开放的互联网上访问,有可能某人会在某处发布一个链接,可能会驱使许多人立即到网站)。 是SQLite的一种可能吗? 我知道这不是一
我正在考虑使用SQLite作为一个网站的生产数据库,将接收大约20个同时的用户,但潜在的峰值可能是其中的许多倍数(因为该网站将在开放的互联网上访问,有可能某人会在某处发布一个链接,可能会驱使许多人立即到网站)。

是SQLite的一种可能吗?

我知道这不是一个理想的生产场景。我只是问这是否在一个现实的可能性的范围内。

SQLite不支持任何类型的并发,所以你可能有问题在生产网站上运行它。如果你正在寻找一个更轻的数据库,也许可以考虑尝试一个当代的对象 – 文档存储像CouchDB。

一切意味着继续开发针对SQLlite,你可能很好,最初使用它。如果你发现你的应用程序有更多的用户下来轨道,你将要转换到postgres或mysql。

SQLlite的作者解决了这个on the website:

SQLite usually will work great as the database engine for low to medium traffic websites (which is to say,99.9% of all websites). The amount of web traffic that SQLite can handle depends,of course,on how heavily the website uses its database. Generally speaking,any site that gets fewer than 100K hits/day should work fine with SQLite. The 100K hits/day figure is a conservative estimate,not a hard upper bound. SQLite has been demonstrated to work with 10 times that amount of traffic.

SQLite will normally work fine as the database backend to a website. But if you website is so busy that you are thinking of splitting the database component off onto a separate machine,then you should definitely consider using an enterprise-class client/server database engine instead of SQLite.

所以我认为它的长短是,去为它,如果它不能很好地为你工作,使转换到企业级数据库是相当微不足道。然而,照顾你的模式,并设计数据库的成长和效率。

这里是a thread与一些更独立的评论围绕使用SQLite的生产Web应用程序。它听起来像已经使用一些混合的结果。

编辑(2014):

因为这个答案发布,SQLite现在功能一个multi-threaded mode和write ahead logging mode,这可能会影响它的适合低中等交通网站的评价。

Charles Leifer写了a blog post关于SQLite的WAL(预写日志)功能和一些很好的考虑对适当的用例的意见。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读