`
Tonyguxu
  • 浏览: 281437 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Memcache入门介绍

 
阅读更多

什么是Memcached?

http://memcached.org/ 写道
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.

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

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能做什么?

 

memcached allows you to take memory from parts of your system where you have more than you need and make it accessible to areas where you have less than you need.


memcached also allows you to make better use of your memory. If you consider the diagram to the right, you can see two deployment scenarios:


deployment strategy 1 : Each node is completely independent (top).

deployment strategy 2 : Each node can make use of memory from other nodes (bottom).

 

The first scenario illustrates the classic deployment strategy, however you'll find that it's both wasteful in the sense that the total cache size is a fraction(一部分) of the actual capacity of your web farm, but also in the amount of effort required to keep the cache consistent across all of those nodes.


With memcached, you can see that all of the servers are looking into the same virtual pool of memory. This means that a given item is always stored and always retrieved from the same location in your entire web cluster.

 

-----应用需求的增长,数据的增长-----

Also, as the demand for your application grows to the point where you need to have more servers, it generally also grows in terms of the data that must be regularly accessed. A deployment strategy where these two aspects of your system scale together just makes sense.


The illustration to the right only shows two web servers for simplicity, but the property remains the same as the number increases. If you had fifty web servers, you'd still have a usable cache size of 64MB in the first example, but in the second, you'd have 3.2GB of usable cache.


Of course, you aren't required to use your web server's memory for cache. Many memcached users have dedicated machines(专用的) that are built to only be memcached servers.

 

 

Memcached有什么特点?

 

若干个疑问

1. 在oschina(http://www.oschina.net/p/memcached/)介绍Memcached时说是集中式缓存系统,那么分布式和集中式有何区别?Memcached是分布式的还是集中式的?

 

 

其他

 

memcached缺乏认证以及安全管制,这代表应该将memcached服务器放置在防火墙后。

memcached的API使用三十二位元的循环冗余校验(CRC-32)计算键值后,将资料分散在不同的机器上。当表格满了以后,接下来新增的资料会以LRU机制替换掉。由于memcached通常只是当作快取系统使用,所以使用memcached的应用程式在写回较慢的系统时(像是后端的数据库)需要额外的程式码更新memcached内的资料。

 

 

分享到:
评论

相关推荐

    包含Redis,memcache,encache的NoSQL入门

    本教程将带你入门NoSQL的世界,特别是聚焦于Redis、Memcached和EnCache这三种流行的数据存储系统。 **Redis** 是一个开源的、基于键值对的数据存储系统,支持多种数据结构如字符串、哈希、列表、集合和有序集合。它...

    Memcache入门到精通[张振华.Jack]

    Memcached介绍、应用场景、运行机制 Memcached安装 Memcached启动,参数 Memcached连接、监控 Memcached客户端命令 Memcached的Java客户端实例 Memcached的客户端分布式原理 Memcached的服务器端运行原理 Memcached...

    阿里云-云数据库Memcache-快速入门.pdf

    云数据库Memcache版快速入门主要介绍了阿里云提供的基于Memcached协议的分布式内存缓存服务,旨在提升应用程序的数据访问速度和性能。以下是对该服务关键知识点的详细说明: 1. **协议支持**: - **Memcached ...

    Windows_Memcache安装(XAMPP+Memcache+PHP)

    针对Memcache的安装与配置,以及如何在PHP中调用Memcache,本文提供了两个视频教程的链接,分别介绍了安装配置的全过程和PHP调用方法的具体操作。这些教程可以作为学习Memcache安装和使用过程中的辅助材料。 综上所...

    NoSQL入门介绍

    3.2、Key-Value介绍(Memcache) 3.2.1、Memcache是什么 3.2.2、Memcache的特性 3.2.3、Memcache的架构 3.2.4、Memcache的简单使用 3.2.5、Memcache的图形管理工具 3.3、Couchbase介绍 3.3.1、Couchbase是什么 ...

    Java开发中的Memcache原理及实现以及Redis的入门

    **Redis的入门指导** Redis是一款开源的、高级的键值存储系统,它支持更多数据结构,如字符串、哈希、列表、集合和有序集合,使得它在数据库、缓存和消息中间件等场景中都有广泛应用。 1. **安装与启动**: Redis的...

    阿里云-云数据库Memcache-快速入门-D.docx

    阿里云的云数据库Memcache版是一款基于分布式内存计算技术的高性能缓存服务,它提供了对Memcached协议的全面支持,让任何兼容Memcached协议的客户端都能无缝接入。该服务旨在提高应用程序的性能,减少对数据库的压力...

    NoSQL 入门.ppt

    3.2、Key-Value介绍(Memcache) 3.2.1、Memcache是什么 3.2.2、Memcache的特性 3.2.3、Memcache的架构 3.2.4、Memcache的简单使用 3.2.5、Memcache的图形管理工具 3.3、Couchbase介绍 3.3.1、Couchbase是什么 3.3.2...

    demo_memcache_ieda

    描述提到"memcached的入门小例子,使用两种不同的jar访问客户端",这表明我们将探讨如何通过Java编程接口(API)来连接和操作分布式内存缓存系统Memcached,同时会涉及两个不同的客户端库。 **Memcached基础知识** ...

    阿里云 专有云Enterprise版 云数据库Memcache版 V3.3.0 用户指南 20180312.pdf

    该指南涵盖了云数据库Memcache版的基本概念、快速入门、基本操作、故障处理和高级主题等方面的内容。 云数据库Memcache版概述: 云数据库Memcache版是阿里云提供的一种基于Memcache协议的高性能NoSQL数据库,旨在...

    Memcache资料合集

    3. "memcached入门到理解.pdf":适合初学者,从基础开始介绍,逐步深入理解Memcached。 4. "Java_Memcache.pdf":专注于Java环境下的Memcache使用,包括客户端库的使用示例和最佳实践。 通过这些资料,你可以系统地...

    阿里云 专有云企业版 V3.8.1 云数据库 Memcache 版 用户指南 20190910

    《用户指南》详细介绍了云数据库Memcache版的安装、配置、维护等操作流程。在安装部分,用户可以了解如何根据自身业务需求选择合适的实例类型和规格,并进行实例的创建和初始化。配置部分则涵盖了网络配置、安全组...

    memcache学习资料(包含memcache和java_memcache相应的jar)

    `java_memcache`相关的JAR文件通常包含了Java Memcached客户端库,如Xmemcached或spymemcached,这些库提供了API,让Java开发者能够方便地在Java应用中集成和使用Memcached服务。 在Windows环境下部署和使用...

    阿里云 专有云企业版 V3.8.0 云数据库 Memcache 版 用户指南 20190621.pdf

    阿里云专有云企业版V3.8.0云数据库Memcache版用户指南是一份详细介绍如何使用阿里云提供的云数据库Memcache服务的文档。Memcache是一种高性能的分布式内存对象缓存系统,常用于减轻数据库负载,提高应用性能。在本...

    ThinkPHP简单使用memcache缓存的方法

    下面将详细介绍如何在ThinkPHP框架中简单使用Memcache缓存的方法。 首先,了解ThinkPHP的默认缓存方式通常是File方式,这意味着缓存数据会被存储在服务器的文件系统中。如果你的服务器安装了Memcached服务,你可能...

    阿里云 专有云企业版 V3.8.2 云数据库 Memcache 版 用户指南 20200420.pdf

    文档的目录结构包括了多个部分,如“什么是云数据库KVStore for Memcache”,这一章节会详细介绍Memcache的基本概念和功能。"使用须知"可能涵盖服务的使用限制、计费方式、服务等级协议(SLA)等。"快速入门"则为初次...

    阿里云 专有云企业版 V3.9.0 云数据库 Memcache 版 用户指南 20191017.pdf

    除了法律声明和通用约定,指南还包括了产品介绍、使用教程、操作步骤、API参考等内容,帮助用户从快速入门到深入使用全面掌握云数据库Memcache服务。 6. **操作指导**: - 指南可能包含如何创建和管理Memcache...

    阿里云 专有云企业版 V3.6.1 云数据库KVStore for Memcache 用户指南 - 20181105.pdf

    3. **快速入门**: 介绍了如何创建和管理KVStore for Memcache实例,包括实例的创建、配置和连接。 4. **操作指南**: 提供详细的操作步骤,包括数据导入导出、监控与报警设置、安全策略配置等。 5. **API参考**: 列出...

    memcached_termkqh_memcache_

    标题中的 "memcached_termkqh_memcache_" 可能是某种特定的命名约定或者版本标识,这里我们主要关注 "memcached" 这个关键词。描述提到这是一个设计开发文档,内容简短易懂,适合初学者快速入门。 **核心知识点:**...

    ThinkPHP3.2.3框架Memcache缓存使用方法实例总结

    最后,为了更好地理解和使用ThinkPHP框架下的Memcache缓存功能,建议参考更多ThinkPHP相关内容的教程和专题,如《ThinkPHP入门教程》、《ThinkPHP模板操作技巧总结》等,这些资源可以帮助开发者更加全面地掌握...

Global site tag (gtag.js) - Google Analytics