PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, November 13, 2022

[FIXED] When not to use memcache

 November 13, 2022     memcached, php     No comments   

Issue

Currently we are having a site which do a lot of api calls from our parent site for user details and other data. We are planning to cache all the details on our side. I am planning to use memcache for this. as this is a live site and so we are expecting heavier traffic in coming days(not that like FB but again my server is also not like them ;) ) so I need your opinion what issues we can face if we are going for memcache and cross opinions of yours why shouldn't we go for it. Any other alternative will also help.


Solution

https://github.com/steveyen/community-site/blob/master/db_doc/main/WhyNotMemcached.wiki

Memcached is terrific! But not for every situation...

  • You have objects larger than 1MB.
    • Memcached is not for large media and streaming huge blobs.
    • Consider other solutions like: http://www.danga.com/mogilefs
  • You have keys larger than 250 chars.
    • If so, perhaps you're doing something wrong?
    • And, see this mailing list conversation on key size for suggestions.
  • Your hosting provider won't let you run memcached.
    • If you're on a low-end virtual private server (a slice of a machine), virtualization tech like vmware or xen might not be a great place to run memcached. Memcached really wants to take over and control a hunk of memory -- if that memory gets swapped out by the OS or hypervisor, performance goes away. Using virtualization, though, just to ease deployment across dedicated boxes is fine.
  • You're running in an insecure environment.
    • Remember, anyone can just telnet to any memcached server. If you're on a shared system, watch out!
  • You want persistence. Or, a database.
    • If you really just wish that memcached had a SQL interface, then you probably need to rethink your understanding of caching and memcached.


Answered By - OZ_
Answer Checked By - Senaida (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing