Often, integration between multi-lingual and multi-system is a big problem, in general, people tend to use webservice to deal with such integration problems, but regardless of the style of webservice, such as RPC style, or restful style, it has a
The original is from http://blog.csdn.net/fdipzone/article/details/7166520This article requires you to have a general understanding of Gearman.By the way, we recommend two reference
In a project, when it comes to large traffic, a reasonable use of caching can reduce the stress on the database while improving the user experience. That is, in the premise of non-real-time demand, a short period of time (a few seconds), for the
After making a Web cluster, you will certainly first consider the session synchronization problem, because after load balancing, the same IP access to the same page will be assigned to different servers, if the session is not synchronized, a login,
First, test environment in Ubuntu Kylin14.0464bit has installed MySQL, Redis, PHP, lib_mysqludf_json.so, Gearman. Click here to view the test database and table reference this article also has some basic operations, which are described in the
The memcached is based on the CS structure and is not based on the BS structure, because he has no relationship with Apache and is largely dependent on PHP. is to rely on libevent to handle concurrency.Memcached is the use of built-in memory to
//Redis$redis=NewRedis ();$redis->connect ("host", "Port");$redis->select (0);//Redis defaults to 0-15 16 databases select 0 here$redis->dbsize ();//returns the number of keys$keys=$redis->keys ("*");//list all keys by using a wildcard
code is as follows
copy code
? PhpClass Memcachemodel {Private $MC = null;/*** Constructs a method for adding servers and creating memcahced objects*/function __construct () {$params = Func_get_args ();$MC = new Memcache;If you
The PHP session of the Web server is given to memcached so that you do not have a problem with which Web server the Distributor will divide the IP connection to, and the configuration method is simple, in the PHP configuration fileAdding a statement
Data caching:
With the development of Internet technology, the bottleneck of network speed is mainly focused on access distance and server load capacity.
An extended server or mirror server is expensive to operate and maintain as a basic solution,
Feel Nodejs about the log (LOG4JS) management network has n version, the following LOG4JS configuration is my successful case ...
First:
Download installation LOG4JS package (entry path under Project command)
NPM Install Log4js
Installation
Data caching
Here is the data cache refers to the database query cache, each visit to the page, will first detect the corresponding cache data exists, if not, connect the database, get the data, and the query results serialized after saving to the
This example describes the PHP memory cache memcached class. Share to everyone for your reference.
The implementation methods are as follows:
Copy Code code as follows:
? Php
Class Memcachemodel {
Private $MC = null;
/**
*
The PHP session of the Web server is given to memcached so that you do not have a problem with which Web server the Distributor will divide the IP connection to, and the configuration method is simple, in the PHP configuration fileAdding a statement
A related introduction 1.memcache + memcache Introduction to multi-server data sharing , see http://www.guigui8.com/index.php/ archives/206.html 2.session mechanism: the session mechanism is a server-side mechanism that uses a structure
Next: MySQL uses mysql-udf-http efficiency test notes, this time not using the rest architecture, but using: libmemcached and Memcached_functions_mysql, the test version is:
Libmemcached-0.34.tar.gz and memcached_functions_mysql-0.9.tar.gz, other
db1:192.168.254.128db2:192.168.254.129School-time operation prior to configuration#安装ntpdate工具Yum Install Ntpdate-y#使用ntpdate校时 (followed by NTP server)Ntpdate pool.ntp.orgConfigure MySQL dual master standbyInstall the database link (you can see it
First, test environment in Ubuntu Kylin 14.04 64bitMySQL, Redis, PHP, lib_mysqludf_json.so, Gearman have been installed.Click here to view the test database and table referenceThis article also has some basic operations, which are described in the
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.