原文地址:memcached手册     https://github.com/memcached/memcached/wiki/Overview

简介

Free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.

免费,开源,高性能,分布式对象缓存数据库,一般在业界中,它的目的是通过减轻数据库负载来加速动态web应用程序。

Memcached is an in-memory key-value store for small arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.

Memcached是一种基于内存的key-value存储,用来存储小块的任意数据(字符串、对象)。这些数据可以是数据库调用、API调用或者是页面渲染的结果。

Memcached is simple yet powerful. Its simple design promotes quick deployment, ease of development, and solves many problems facing large data caches. Its API is available for most popular languages.

Memcached简洁而强大。它的简洁设计便于快速开发,减轻开发难度,解决了大数据量缓存的很多问题。它的API兼容大部分流行的开发语言。

工作原理

Memcached is a developer tool, not a "code accelerator", nor is it database middleware. If you're trying to set up an application you have downloaded or purchased to use memcached, read your app's documentation. This wiki and community will not be able to help you.

Memcached是一种开发工具,而不是“代码加速器”,也不是数据库中间件。如果你试图建立一个你已经下载或购买的应用程序来使用memcached,请阅读你的应用程序的文档。这个文档和社区将无法帮助你。

组成部分

  • Client software, which is given a list of available memcached servers.
  • A client-based hashing algorithm, which chooses a server based on the "key".
  • Server software, which stores values with their keys into an internal hash table.

LRU, which determine when to throw out old data (if out of memory), or reuse memory.

Design Philosophy  设计理念

Simple Key/Value Store    简单的键/值 存储

The server does not care what your data looks like. Items are made up of a key, an expiration time, optional flags, and raw data. It does not understand data structures; you must upload data that is pre-serialized. Some commands (incr/decr) may operate on the underlying data, but in a simple manner.

Memcached不关心你的数据是什么。items由一个key,一个过期时间,可选择的标记,还有一个数据。它不了解数据结构,所以你必须提交一个已经序列化的数据给它。一些命令(incr/decr)可以用简单的方式对底层数据进行操作。

Logic Half in Client, Half in Server   逻辑处理一半在客户端,一半在服务器

A "memcached implementation" is partially in a client, and partially in a server. Clients understand how to choose which server to read or write to for an item, what to do when it cannot contact a server.

memcached的实现,部分在客户端,部分在服务器。客户端知道如何选择要为项目读取或写入的服务器,以及在无法联系服务器时要执行的操作。

The servers understand how store and fetch items. They also manage when to evict or reuse memory.

服务器了解如何存储和获取数据。 他们也可以从内存中移除数据或者复用数据。

Servers are Disconnected From Each Other 服务器彼此之间是无连接的

Memcached servers are unaware of each other. There is no crosstalk, no syncronization, no broadcasting, no replication. Adding servers increases the available memory. Cache invalidation is simplified, as clients delete or overwrite data on the server which owns it directly.

Memcached服务器彼此之间是无联系的。它们之间没有串扰,没有同步,没有广播,没有复制。添加服务器,就会增加可用内存。让缓存失效的操作很简单,你可以让客户端删除这条记录或者覆盖服务器上面的数据。

O(1)  最低的时空复杂度

All commands are implemented to be as fast and lock-friendly as possible. This gives allows near-deterministic query speeds for all use cases.

全部的命令实现起来都是非常快的并且对锁尽可能的友好。对查询速度速度也是非常快的。

Queries on slow machines should run in well under 1ms. High end servers can serve millions of keys per second in throughput.

慢速机器上的查询应该在1ms以下运行。 高端服务器的吞吐量可以达到每秒数百万个密钥。

Forgetting is a Feature  缓存过期

Memcached is, by default, a Least Recently Used cache. Items expire after a specified amount of time. Both of these are elegant solutions to many problems; Expire items after a minute to limit stale data being returned, or flush unused data in an effort to retain frequently requested information.

数据在指定的时间后过期。 这些都是许多问题的优雅解决方案; 一分钟后过期数据以限制返回的陈旧数据,或将缓存中未使用的数据替换为经常请求的信息数据。

Cache Invalidation  缓存失效

Rather than broadcasting changes to all available hosts, clients directly address the server holding the data to be invalidated

客户机不直接向所有可用主机广播更改,而是直接向服务器保存数据,以使其失效。

1.Memcached 中文文档 - 概论(译官方文档)的更多相关文章

  1. Sencha Cmd 6 和 Ext JS 6 指南文档(部分官方文档中文翻译)

    近期组织了几个程序员网友,正在翻译一部分官方的Sencha Cmd 6 和 Ext JS 6 指南文档. 眼下还没翻译完,大家能够先看看 Sencha Cmd 6 和 Ext JS 6 指南文档  ( ...

  2. GIS中的坐标系【Esri官方文档部分翻译】

    GCS 地理坐标系(GCS)使用椭圆体表面来定义地球上的位置.地理坐标系有三个部分: 基准面,是地球的椭圆体(椭球体)模型 本初子午线 角度单位 常见基准包括WGS84(用于GPS)和NAD83(用于 ...

  3. 【Phabricator】教科书一般的Phabricator安装教程(配合官方文档并带有踩坑解决方案)

    随着一声惊雷和滂沱的大雨,我的Phabricator页面终于在我的学生机上跑了起来. 想起在这五个小时内踩过的坑甚如大学隔壁炮王干过的妹子,心里的成就感不禁油然而生. 接下来,我将和大家分享一下本人在 ...

  4. OKHttp 官方文档【一】

    最近工作比较忙,文章更新出现了延时.虽说写技术博客最初主要是写给自己,但随着文章越写越多,现在更多的是写给关注我技术文章的小伙伴们.最近一段时间没有更新文章,虽有工作生活孩子占用了大部分时间的原因,但 ...

  5. OKHttp 官方文档【二】

    OkHttp 是这几年比较流行的 Http 客户端实现方案,其支持HTTP/2.支持同一Host 连接池复用.支持Http缓存.支持自动重定向 等等,有太多的优点. 一直想找时间了解一下 OkHttp ...

  6. TensorFlow 官方文档中文版 --技术文档

    1.文档预览 2.文档下载 TensorFlow官方文档中文版-v1.2.pdf 提取码:pt7p

  7. mysql 新手入门 官方文档+官方中文文档附地址

    点评: 官方文档地址 官方中文文档地址 sql语句扩展

  8. tensorflow官方文档中的sub 和mul中的函数已经在API中改名了

    在照着tensorflow 官方文档和极客学院中tensorflow中文文档学习tensorflow时,遇到下面的两个问题: 1)AttributeError: module 'tensorflow' ...

  9. 【AutoMapper官方文档】DTO与Domin Model相互转换(中)

    写在前面 AutoMapper目录: [AutoMapper官方文档]DTO与Domin Model相互转换(上) [AutoMapper官方文档]DTO与Domin Model相互转换(中) [Au ...

随机推荐

  1. BZOJ_1801_[Ahoi2009]chess 中国象棋_DP

    BZOJ_1801_[Ahoi2009]chess 中国象棋_DP Description 在N行M列的棋盘上,放若干个炮可以是0个,使得没有任何一个炮可以攻击另一个炮. 请问有多少种放置方法,中国像 ...

  2. React组件设计

    React组件设计 组件分类 展示组件和容器组件 展示组件 容器组件 关注事物的展示 关注事物如何工作 可能包含展示和容器组件,并且一般会有DOM标签和css样式 可能包含展示和容器组件,并且不会有D ...

  3. Android P Beta发布!最新版本抢先体验!

    在不久前结束的谷歌I/O开发者大会上,谷歌公布了下一个版本的 Android,也就是 Android P 的 beta 版本.Android P 将 AI 定位为操作系统的核心,并侧重于提供智能且简洁 ...

  4. 使用Freemarker 实现JSP页面的静态化

    使用Freemarker 静态化网页 一.原理 Freemarker 生成静态页面,首先需要使用自己定义的模板页面,这个模板页面可以是最最普通的html,也可以是嵌套freemarker中的 取值表达 ...

  5. java 判断是否为中文字符,部分,。中文符号不能识别

    public static void main(String[] args) { int i = 0; for (char c : ",.判断一个字符串是否有中文一般情况是利用Unicode ...

  6. Jmeter----创建第一个接口测试流程

    第一步.创建线程 第二步.添加一个HTTP请求 第三步.设置request的请求头信息 根据自己需要填写的请求头信息进行填写,如下是我需要接口测试时填写的请求头 第四步.设置相关的HTTP请求参数,完 ...

  7. UWP中实现大爆炸效果(一)

    自从老罗搞出大爆炸之后,各家安卓都内置了类似功能.UWP怎么能落下呢,在这里我们就一起撸一个简单的大爆炸实现. 闲话不说,先上效果: 因为代码太多,所以我打算写成一个系列,下面是第一篇的正文: 首先, ...

  8. 关于socket.io的使用

    这段时间学习了socket.io,用它写了小项目,在此总结下它的基本使用方式和一些要点. socket.io是基于Node.js和WebSocket协议的实时通信开源框架,它包括客户端的JavaScr ...

  9. asp.net core系列 56 IS4使用OpenID Connect添加用户认证

    一.概述 在前二篇中讲到了客户端授权的二种方式: GrantTypes.ClientCredentials凭据授权和GrantTypes.ResourceOwnerPassword密码授权,都是OAu ...

  10. (leetcode:选择不相邻元素,求和最大问题):打家劫舍(DP:198/213/337)

    题型:从数组中选择不相邻元素,求和最大 (1)对于数组中的每个元素,都存在两种可能性:(1)选择(2)不选择,所以对于这类问题,暴力方法(递归思路)的时间复杂度为:O(2^n): (2)递归思路中往往 ...