当前位置:网站首页>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
边栏推荐
- js点击图片打印图像
- [MySQL series] - how much do you know about the index
- 留存收益率计算公式
- Is it safe for Huishang futures to open an account? What should Huishang futures pay attention to when opening an account?
- In the era of Web3.0, the technical theory of implementing a DAPP based on P2P DB
- Summary of common interview questions of computer composition principle, including answers
- 加载 iframe 时显示加载指示器
- The hardest lesson we learned from the crypto Market
- word-break: break-all VS word-wrap: break-word
- ROS2节点通信实现零拷贝
猜你喜欢

七、微信小程序运行报错:Error: AppID 不合法,invalid appid

What are the characteristics of low code tools? The two development tracks of low code that can be seen by discerning people!

Retrieve the parameters in this method in idea for our use -- 1. Class diagram. 2. Double click shift
![[hero planet July training leetcode problem solving daily] 26th and check the collection](/img/f1/e63b1f35b883274ca077cbd2ab4c24.png)
[hero planet July training leetcode problem solving daily] 26th and check the collection

【HCIE安全】双机热备-主备备份

【HCIA安全】用户认证

How to implement Devops with automation tools | including low code and Devops application practice

A unified label space for entity relationship extraction

【HarmonyOS议题资料下载】HDD杭州站·线下沙龙专注应用创新 展现鸿蒙生态魅力

Deepfake pinches his face. It's hard to tell whether it's true or false. Tom Cruise is more like himself than himself!
随机推荐
Calculation formula of retained earnings rate
Live broadcast appointment award | senior consultant xuyanfei: how does efficiency measurement help efficient and sophisticated outsourcing management
Arm Mali GPU的噩梦:三星、华为纷纷转向自研!
Make a resizable element
记一次invalid bound statement xxxxxx 问题解决思路
Serial port communication failure
Ros2 method of obtaining current system time
Custom annotation (I)
Placeholder of contentedable element
(C language) a brief introduction to define
在上传之前预览图像
[download materials of harmoniyos topics] HDD Hangzhou station · offline salon focuses on application innovation to show the ecological charm of Hongmeng
基于Hough变换的直线检测(Matlab)
使用 LSTM 进行多变量时间序列预测--问题汇总
Alkbh1
Registration conditions for information system project managers in the second half of 2022 (soft examination advanced)
(C语言)文件的基本操作
ECCV 2022 | 同时完成四项跟踪任务!Unicorn: 迈向目标跟踪的大统一
Deployment of kubernetes
2022 open atom global open source summit agenda express | list of sub forum agenda on July 27