Memcache multi-server, how to solve

Source: Internet
Author: User
Memcache Multi-server
PHP operation Memcache can add multiple memcache servers with Memcache::addserver

$memcache = new Memcahce;
$memcache->addserver ($ip 1,11211);
$memcache->addserver ($ip 2,11211);
I do not understand the server, there are a few points do not understand the hope of pointing

I understand that memcache is used to cache data, if it is a server on a memcache server can not solve the large traffic, then we set the second Memcache server IP is not another machine, and our website code can only be placed on a server bar, For example, we put the site source on the IP1 server, then I add a second memcache server what is the use of $memcache->addserver ($ip 2,11211); IP2 isn't another machine doing the server? I do not understand this very much, what cluster has not understood to seek master guidance

Share to:


------Solution--------------------
Yes, IP2 is another machine.
So what you need to save may be in ip1 or in IP2.
But you don't have to care about him, you just need to know what you can get back at any time.
------Solution--------------------
With 100,000 concurrent, a technology should be able to allocate each of the 10,000 concurrency (load balancing is this?). )。 Yes
Do you want to have index.php files on all 10 servers (i.e., to synchronize the Web source data for 10 servers)? Yes

Is there a problem with multiple memcache servers just to increase data storage capacity? Or is it going to improve efficiency?
capacity increases and efficiency increases (load balancing)

For example:
There are 1 servers apache+php (storage site source code) and 10 Memcache servers (storage data)
100,000 concurrent to these 1 servers, from the 10 mm respectively to fetch data and only from 1 mm server to fetch data is the same fast
each memcache has a connection number and memory allocation limit, the data speed depends on the network speed.
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.