当前位置:网站首页>Six instructions of Memcache based caching mechanism
Six instructions of Memcache based caching mechanism
2022-07-26 21:30:00 【Brother Xing plays with the clouds】
Memcached Is a high-performance Distributed Memory object caching system , For dynamic Web Application to reduce database load . It reduces the number of database reads by caching data and objects in memory , To improve dynamics 、 Speed of database driven websites .Memcached Based on a storage key / Value pairs hashmap. Its daemons (daemon ) Yes, it is C Written , But the client can be written in any language , And pass memcached Protocol communication with Daemons .
The main function :
- The server Parameter monitoring :STATS、SETTINGS、ITEMS、SLABS、SIZES Real time refresh
- The server Performance monitoring :GET、DELETE、INCR、DECR、CAS Real time monitoring of hit rate of common operations
- Support data traversal , Easy to monitor the stored content
- Support condition query , Screen out the KEY or VALUE
- Array 、JSON And so on
- compatible memcache Other services of the agreement , Such as Tokyo Tyrant ( Except for traversal function )
- Support The server Connection pool , many The server Management switching is convenient and simple
stay Nginx Server standards HTTP One of the modules ngx_http_memcached_module modular , Dedicated to handling and memcached Related configuration and function realization ,
1, memcached_pass
Used for configuration memcached The address of the server
memcached_pass adress;
among address by memcached The address of the server , Support IP+ Port or domain name address , You can also use upstream The instruction configures a memcacched Server groups , And then configure it to upstream The name of
2, memcached_connect_timeout
Used to configure connections memcached Server timeout time ,
memcached_connect_timeout time;
time Unset timeout , The default is 60, It is recommended not to exceed 75;
3, memcached_read_timeout
To configure Nginx Server to the memcached The server sends two read Wait timeout between requests , If the event does not wake up the data transmission , The connection will close
memcached_read_timeout time;
Default time 60
4 memcached_send_timeout
Used for configuration Nginx Server to the memcached The server sends two write Wait timeout between requests , If the event does not wake up the data transmission , The connection will close
5 memcached_buffer_size
Used for configuration Nginx The server is used to receive memcached Cache size of server response data
memcached_buffer_size size
size Cache size set for , Generally, the memory size of the platform is also different
memcached_buffer_size 4K|8K
6, memcached_next_upstream Instructions
Used to configure a group memcached Server , In the server group memcached The access rules of the server follow upstream Polling rules for command configuration , At the same time, you can use this instruction to configure when those exceptions occur , The request will be refueled in sequence to the next group and processed by the server
memcached_next_uptream status ...
among , status Not set memcached The server returns status , It can be more than one
error Establishing connection at , towards memcached The server encountered an error while sending the request or reading the response header
timeout Establishing connection at , towards memcached When the server sends a request or reads the corresponding header, the server has a connection timeout
incalid_header, memcached The response header returned by the server is empty or invalid
not_found, memcached The server did not find the right key / It's worth it
off Unable to send request to memcache Short service
边栏推荐
- < button> and < input type=button />
- Summary of common interview questions on computer network, including answers
- Set the template of core configuration file in idea
- [hcie security] dual computer hot standby - primary and standby backup
- (C language) a brief introduction to define
- What are the characteristics of low code tools? The two development tracks of low code that can be seen by discerning people!
- Smooth scroll to element
- Calculation formula of retained earnings rate
- JVM learning - memory structure - program counter & virtual machine stack & local method stack & heap & method area
- There are six ways to help you deal with the simpledateformat class, which is not a thread safety problem
猜你喜欢

Difference between redis hash and string

Error in render: “TypeError: data.slice is not a function“

Live broadcast appointment award | senior consultant xuyanfei: how does efficiency measurement help efficient and sophisticated outsourcing management

Browser browser cache

【MySQL系列】-索引知多少

Some unexpected bug records

测试用例千万不能随便,记录由一个测试用例异常引起的思考

MySQL的JDBC操作及入门案例

Set the template of core configuration file in idea

In addition to "adding machines", in fact, your micro service can be optimized like this
随机推荐
Solution to the problem of sticking and unpacking TCP
< button> and < input type=button />
idea中debug时如何进入指定的用户方法体中?
【HCIA安全】双向NAT
(C语言)文件的基本操作
25张炫酷交互图表,一文入门Plotly
JVM learning - memory structure - program counter & virtual machine stack & local method stack & heap & method area
1-《PyTorch深度学习实践》-线性模型
伟创力回应“扣押华为物料”事件:深感遗憾,期待继续合作!
谈谈 TCP 的 TIME_WAIT
2022 open atom global open source summit agenda express | list of sub forum agenda on July 27
LiveDatade的基本使用
日本批准向韩出口EUV光刻胶,三星、SK海力士危机或将缓解
Filtering and distortion
[HCIA security] NAT network address translation
【Flutter -- GetX】弹框 - Dialog、Snackbar、BottomSheet
在上传之前预览图像
美国再次发难:禁止承包商采购这5家中国公司的设备与技术
除了「加机器」,其实你的微服务还能这样优化
Industrial basic IFC - extract model structure tree