2011-12-10 06:17
浏览 42


I'm working on a web app that's not even online yet. Is implementing memcache or memcached as of right now a bit premature? Should I use it only if:

  • the web app is up, and
  • the database is having a poor performance due to a high traffic/load?

Or is better to implement during development?

Also, in which cases is using a caching interface unnecessary or even disencouraged?

图片转代码服务由CSDN问答提供 功能建议

我正在开发一个甚至还没有在线的网络应用程序。 正在实施 memcache memcached 现在有点过早? 我是否应该仅在以下情况下使用它:

  • Web应用程序已启动,
  • 数据库由于较高而性能较差 流量/负载?


    此外,在哪些情况下使用缓存接口 不必要甚至不鼓励?

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

3条回答 默认 最新

  • dongshipang8094 2011-12-10 06:25

    Know Your Problem Space

    See memcached's own wiki:

    Can using memcached make my application slower?

    Yes, absolutely. If your DB queries are all fast, your website is fast, adding memcached might not make it faster.

    Get It Working First

    Any optimization before you have a stable, working product is premature. You'll spend all your time fiddling with knobs that have zero performance impact on your application.

    Your best bet is to get it into a working state and then do several things:

    Profile performance

    Until you gather performance data you'll have no idea where your bottlenecks truly are. Most likely they're in areas you haven't considered.

    Identify Optimization Payoffs

    Evaluate each problem area for potential performance improvements. Prioritize the areas that will give you the best ROI (return on investment). In some cases the best ROI may be more hardware.

    Implement Optimizations

    Once you've identified what needs to be optimized, create a plan and implement it.


    解决 无用
    打赏 举报

相关推荐 更多相似问题