扩展 phpBB?
我希望通过将读取查询与写入查询分离到两个独立的复制 MySQL 服务器来扩展现有的 phpBB 安装。 有人成功地做到了这一点,特别是使用 phpBB 吗?
到目前为止,我最担心的是查询似乎随意地分散在整个代码中。 我很想听听是否有其他人这样做过,如果是的话,进展如何/过程是什么。
I'm looking to scale an existing phpBB installation by separating the read queries from the write queries to two separate, replicated MySQL servers. Anyone succeeded in doing this, specifically with phpBB?
The biggest concern I have so far is that it seems like the queries are scattered haphazardly throughout the code. I'd love to hear if anyone else did this, and if so, how it went / what was the process.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以尝试MySQL Proxy,这将是一种无需更改应用程序即可拆分查询的简单方法。
You could try MySQL Proxy which would be an easy way to split the queries without changing the application.
只需添加更多内存即可。 足够的 RAM 来容纳整个数据库。 您会惊讶地发现低效的脚本运行速度有多快。 内存可以原谅许多数据库扩展错误。
Just add more RAM. Enough RAM to hold the entire database. You'll be surprised how fast your inefficient script will fly. Memory forgives a lot of database scaling mistakes.
我知道这个问题很久以前就被问到了,但我想分享一下我的经历,以防它可以帮助任何人。
如果你的问题是表锁,并且知道默认的存储引擎那天的phpbb是MyISAM,你考虑过迁移到InnoDB存储引擎吗?
只需找出哪些表最常被锁定,然后将它们转换为 InnoDB。 会话表是这里的第一个候选表,尽管如果这是您的主要瓶颈,您可能希望查看其他优化(例如仅将会话数据存储在内存缓存或其他内容中)。
I know this was asked a long time ago, but I'd like to share what I experienced, in case it can help anyone.
If your problem are table locks, and knowing that the default storage engine of phpbb in that day was MyISAM, have you looked at moving to InnoDB storage engine?
Just find out which tables are most frequently locked, and convert those to InnoDB. The sessions table is the first candidate here, although you may want to look at other optimizations (such as storing session data only in memcache or something) if that is your main bottleneck.