TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Making Highrise faster with memcached

15 点作者 bdotdub超过 16 年前

2 条评论

mdasen超过 16 年前
A lot of the time, memcached won't make things faster: it's meant to make things more scalable. On small sites, memcached won't increase your speed, but when you start getting lots of users, it's wonderful!<p>Memcached allows for O(1) lookups. Your database server probably uses b-tree indexes which are great, but they're log(n) lookups. If you aren't dealing with a large number of hits per second, your database will do very well. Once you start getting a lot of lookups per second n * log(n) starts looking a good bit slower than n * 1.<p>Memcached also allows you to scale effortlessly simply by adding servers. Databases can do replication, but only to a point. Remember, even in multi-master replication schemes, every write must be done on every server. Memcached shards your data so that the writes are only done on one server and the load is distributed and knows where to read based on the hash. And every time you're able to read from memcached, you're lowering the load on the piece that is less easily scaled - your database. So, even non-cached loads should get better simply because some of the lookups that would have gone to the database are now hitting memcached.
评论 #422522 未加载
soundsop超过 16 年前
<i>People are not going to feel the difference between a page rendered in 50ms and one rendered in 100ms.</i><p>I don't think that every 50ms difference is unimportant, but the difference between a 50ms render time and 100ms render time may be unimportant. Anyone have a feel for what the maximum render time is for a page to feel fast?
评论 #422374 未加载