memcached - Memcache in high performance sites with PHP -


I am trying to customize a webservice that needs to be somewhat faster (less than 1 second) And necessary to maintain a high load of requests (more than 1000 / second) we are using memcached as a way of storing objects in "memory". It seems that we are getting large number of output errors from memcash. [Thu 23 Jul 22:59:42 2009] [Error] [Client 123.456.789.10] PHP Warning: Memcache :: Connect () [Memcache.connect]: 127.0.0.1121211 Not connected Maybe, the connection timed out (110)

Then, for questions

  1. The memory would be used to store objects in memory Is that the time to make that? Will APC be a better place for these things? Read number and

  2. Are there common problems that I'm ignoring in establishing memcache to work more efficiently?

Thanks for any help, I'm new to working with memcache, and I think I'm missing something.

To answer your first point:

  • memcached The power is that it allows the creation of a cluster of cache servers: This can not be used on a single server (the way you can use it)
    • The principle is that you have many servers, and each
    • You do not have access to some free RAM to use this RAM, you install a memcatch on these servers, and this Configure to use the quantity of RAM to be used
    • And if a machine is down, it automatically closes it, and Load load balances on others
    • The lack of memcached (for some people) it is network-based (even when you use it on only one machine); Which means "local-only"
  • The APC only works on one machine: it's great to store only the data you need (caching mechanism of caching Is used in a server), or if you have only one server; There is no more data about what you can store in the RAM
    • The main drawback is that it does not scale completely: it is a machine thought; If you have 10, then you have to keep the same data once every 10 times on each machine.
    • To get the data, the APC is said to be 5 times faster, because it is local, and one thing about non-network APC: if you use it opcode cache capability (you want) For sure, make sure you configure it for enough. RAM for Opcode + cache (so that it does not get out of memory for opcode cache, which will be bad)

      If you need more help with a memcache and do not get much help here Is a mailing list, which is sometimes quite active; The effort to do this may be useful.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -