Redis and memcached

Source: Internet
Author: User

Redis:

1, master-slave configuration (master-slave replication will not block the primary,)

1) Bind 192.168.1.2 (please modify the IP address of the machine, otherwise the client cannot access it)

2) slaveof 192.168.1.1 6379 (mapped to the primary server)

3) You can disable data persistence in master, just comment out all the save configurations in the master configuration file and configure data persistence on slave only

Memcached

1, memcached a single cache value is limited to 1M (1000000bytes), the value of the cache must be serializable, must consider the network IO and serialization, deserialization overhead.

You should try to circumvent certain data structures, such as hashtable,datatable

2. The keys of Memcache are limited to 2592000 (30 days) when the time interval from the current time is set to bytes

3, based on libevent (it will Linux epoll,BSD class operating system Kqueue and other event processing functions encapsulated into a unified interface. The performance of O (1) can be played even if the number of connections to the server increases. memcached uses this libevent library, so it can perform its high performance on Linux, BSD,Solaris and other operating systems) the event handling

4, memcached not communicate with each other distributed

Redis and memcached

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.