A collection of helpful DevOps cheat sheets
A collection of helpful DevOps cheat sheets
Redisã®ä½è antirezæ°èªãã«ãããmemcachedã¨Redisã®é·æçæã®æ¯è¼ãç¹ã«ãRedisãåãªããã£ãã·ã¥ç¨ã¢ããªã±ã¼ã·ã§ã³ã¨ãã¦memcachedã¨æ¯è¼ãããã¨ã®ééãã¨ãããããã®åãã¦ãã使ç¨æ¹æ³ã«ã¤ãã¦ã®ç§è¦ã ããªããç§ã¨é¢èããããªããç§ã競å製åããããã¨ãæªãã¨èãã人éã§ãªããã¨ã¯ãåç¥ã§ããããã¦ã¼ã¶ã¼ã«é¸æè¢ããããã¨ã¯æ¬å½ã«ãããã¨ã ã¨æã£ã¦ãã¾ãããã ããããä»ã®æè¡ã¨Redisãæ¯è¼ãããããªãã¨ã¯ã»ã¨ãã©ãã¾ããã§ããã ããããæé©ãªã½ãªã¥ã¼ã·ã§ã³ãé¸ã¶ããã«ã¯ãã¦ã¼ã¶ã¼ã¯æ£ããæ å ±ãæããã°ãªããªãã®ã確ãã§ãã ãã®è¨äºãæ¸ãã®ã¯ãæåãªã©ã¤ãã©ãªã§ããSidekiqã®ä½è ã¨ãã¦ç¥ãããMike PerhamããRedisã®ããã¯ã¨ã³ãã¹ãã¬ã¼ã¸ã¨ãã¦ã®ä½¿ãæ¹ãæ¸ããè¨äºãèªãã ã®ããã£ããã§ããå¾ã£ã¦ãç§ã¯MikeãRedisã«ãå
ä¹ ãã¶ãã«memcache-client gemã使ã£ããåããªãã¦å°ã£ãã http://www.sssg.org/blogs/naoya/archives/1940 ã«memcacheé¢é£ã®gemã解説ããã¦ãããä»ã¯memcachedã¨ããã®ãè¯ããããã memcache-clientã¯éæ¨å¥¨ã«ãªããDalliã«å¼ãç¶ãããããmemcacheã«forkããããããããããã§ãmemcachedã¯twitterã§ä½¿ããã¦ãã¦libmemcachedã®ã©ããã¼ãããã ããã¥ã¡ã³ãã¯ãã http://fauna.github.com/fauna/memcached/files/README.html gem install memcached#!/usr/bin/env ruby require 'rubygems' require 'memcached' cache = Memc
Ruby ã§Â Memcached ãæ±ããã©ã¤ãã©ãªãæ¯è¼ãã¦ã¿ã¾ãããåè£ã¨ãã¦ã¯ã3種é¡ããã¾ãããã¹ã¦ gem ã³ãã³ãä¸çºã§ã¤ã³ã¹ãã¼ã«ãããã¨ãã§ãã¾ãã memcached Twitter 社ã§ä½¿ããã¦ãã Memcached ç¨ã®ã©ã¤ãã©ãªã§ãlibmemcached ã®ã©ããã¼ã§ libmemcached 0.32 ãå«ã¾ãã¦ãã¾ãã2011/02/14 æç¹ã§ã®ãã¼ã¸ã§ã³ã¯ 1.0.6 ã«ãªã£ã¦ãã¾ããMemcached ã«å¯¾ãã主è¦ãªæä½ã«å¯¾å¿ãã¦ãã¾ããéçºãçãã«è¡ããã¦ããå°è±¡ãããã¾ããã½ã¼ã¹ã³ã¼ãã¯ãããããã¥ã¡ã³ãã¯ããã«ããã¾ãã memcache-client Memcached ã«ã¢ã¯ã»ã¹ããããã® Ruby ã®ã©ã¤ãã©ãªã§ãã2011/02/14 æç¹ã§ã®ãã¼ã¸ã§ã³ã¯ 1.8.5 ã«ãªã£ã¦ãã¾ããMemcached ã«å¯¾ãã主è¦ãªæä½ã«å¯¾å¿ãã¦ãã¾ã
memcached An interface to the libmemcached C client. License Copyright 2009-2011 Cloudburst, LLC. Licensed under the AFL 3. See the included LICENSE file. Portions copyright 2007-2009 TangentOrg, Brian Aker, licensed under the BSD license, and used with permission. Features clean API robust access to all memcached features multiple hashing modes, including consistent hashing ludicrous speed, inclu
Scalable, persistent, HA NoSQL Memcache storage using MySQL Cluster The native Memcached API for MySQL Cluster is now GA as part of MySQL Cluster 7.2 This post was first published in April 2011 when the first trial version of the Memcached API for MySQL Cluster was released; it was then up-versioned for the second MySQL Cluster 7.2 Development Milestone Release in October 2011. Iâve now refreshed
(Fedora) % sudo groupadd memcached % sudo useradd -g memcached -s /sbin/nologin -d /nonexistent memcached é å¸ãã¡ã¤ã«å±é % tar zxvf memcached-1.2.6.tar.gz % cd memcached-1.2.6 make,ã¤ã³ã¹ãã¼ã« % ./configure % make % sudo make install ã¤ã³ã¹ãã¼ã«ç© (man,infoã¯é¤ã) /usr/local/bin/memcached /usr/local/bin/memcached-debug åä½ç¢ºèª memcachedãèµ·åããã % memcached -u memcached -d ã¾ãã¯-dãªãã·ã§ã³ã«ã¦ãã¼ã¢ã³ã¢ã¼ãã§memcachedãèµ·åããã ãã®ä»ã主ãªãªãã·ã§ã³ã以ä¸
2008/5/21æ´æ° 対å¿ãã¼ã¸ã§ã³: 1.2.5 memcachedã§ä½¿ç¨å¯è½ãªã³ãã³ãã«ã¯ä»¥ä¸ã®ç¨®é¡ãããã set / get ãã¼ã¿ã®æ ¼ç´ / åå¾ gets ãã¼ã¿ã®åå¾(å¾è¿°ã®cas IDä») replace æ¢åã®ãã¼ã¿ã®å¤æ´ append æ¢åã®ãã¼ã¿ã®å¾ãã«ãã¼ã¿ã追å prepend æ¢åã®ãã¼ã¿ã®åã«ãã¼ã¿ã追å cas ãã¼ã¨cas IDã®ãã¢ã§æ¢åã®ãã¼ã¿ãç¹å®ãã¦å 容ãå¤æ´ incr / decr æ¢åã®ãã¼ã¿ã®å ç®/æ¸ç® delete ãã¼ã¿ã®åé¤ stats ãµã¼ãã®å©ç¨ç¶æ³ã®ã¬ãã¼ã ã³ãã³ãã¯ä»¥ä¸ã®ãã©ã¼ãããã§æå®ããã set, replace, append, prepend <ã³ãã³ã> <ãã¼> <ãã©ã°> <æå¹æé> <ãµã¤ãº> cas <ã³ãã³ã> <ãã¼> <ãã©ã°> <æå¹æé> <ãµã¤ãº> <cas ID> incr, decr
What is Memcached? 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.
ãã¡ãã¨ãã¡ãã®ã¨ã³ããªã¼ã®ç¶ã memcached 1.4.6ã§mixiã®é害ã®åå ã¨ãªã£ãaccept_new_connsãã¹ã¬ããã»ã¼ããããªã件ã¯ä¿®æ£ããã¦ããã¯ãã ã£ãã®ã§ãããæ¤è¨¼ããã¨ããå¥ã®ã¹ã¬ãã競åã«ããä¸å ·åãçºçããBugã¯å ¨ã¦è§£æ¶ããã¦ã¯ãã¾ããã§ããã ãã®ä»¶ã«ã¤ãã¦mixiããã½ã½Gã®æ£®æ¬ããã¨èª¿æ»ãã¦ããã¨ãããmemcachedã®commiterã«twitterä¸ã§è£è¶³ãããã¤ããªãè±èªã§å ±åãããã¦ããã1.4.7-rc1ã§ä¿®æ£ãããã®ã§ãã®å ±åã memcached 1.4.6ã§ã®ä¸å ·ååç¾æ¹æ³ ã¾ãã1.4.6ã§ä¸å ·åãåç¾ãããæ¹æ³ã«ã¤ãã¦ãmixiã®ã¨ã³ã¸ãã¢ããã°ã¨åãããã«ãmemcachedã¯æ¬¡ã®ãªãã·ã§ã³ã§èµ·åãã $ ./memcached -U 0 -u nobody -p 11222 -t 4 -m 16000 -C -c 1000
ã¯ã©ã¤ã¢ã³ãããmemcachedãå©ç¨ããéã®ããã¹ããã©ã¯ãã£ã¹ã¯ä»¥åæ¸ãã¦ããã®ã§ããã®å段éã§memcachedãå«ããWebã¢ããªã±ã¼ã·ã§ã³ã®ã¢ã¼ããã¯ãã£(ã¨ä¸é¨ã¯ã©ã¤ã¢ã³ãã®è©±)ã«ã¤ãã¦ä»ã®å人çãªèããã¾ã¨ãã¦ã¿ã¾ããKyoto Tycoonã使ã£ããã£ãã·ã¥ãµã¼ãã§ãåºæ¬ã¯åãã ã¨æãã¾ã 1) 使ããªã memcachedãã¢ããªã±ã¼ã·ã§ã³ã«çµã¿è¾¼ããã¨ã§ãããã°ã©ã ãã©ããã¦ãè¤éã«ãªããã¡ã§ãããã¼ã¿ã®åé¤ãæ´æ°ã®éã«ãã£ãã·ã¥ã®æ´æ°ãå¿ããã¨å¤ãã®åé¡ãçºçãã¾ããä¾ãã°ã¦ã¼ã¶ãããã¯ãã¼ã ããããã£ã¼ã«åçãæ´æ°ããã®ã«ç»é¢ä¸å¤ãããªããªã©ã®ç¾è±¡ãèµ·ããã¨ãã¦ã¼ã¶ã«å¯¾ãã¦ä¸å¿«ãªæããããã¦ãã¾ãã§ããããã¾ããã¼ã¿ãã¼ã¹ãéåæã®ã¬ããªã±ã¼ã·ã§ã³ãè¡ã£ã¦ããå ´åãmasterã«å¯¾ãã¦ãã¼ã¿ã®å¤æ´ããããæ´æ°ãåæ ãããåã«slaveããèªã¿è¾¼ãã§ãã¾ãããã£ãã·
2009å¹´10æ19æ¥22:50 Perl Ruby memcachedãä»ãã¦ãPerlã¨Rubyã§ãã¼ã¿ãã»ãã»ããã¦ã¿ã ãµã¨æã£ã¦ãRuby ã§ãã¼ã¿ã memcached ã«å ¥ãã¦ãããã Perl ããåãåºããã®ããªãã¨ããã®ãæ°ã«ãªã£ãã®ã§è©¦ãã¦ã¿ã¾ããããã¼ã¿ã®å½¢å¼ã¨ãã¦ãæååãActiveRecordãããã·ã¥ããããã試ãã¦ã¿ã¾ããäºæ³ã§ã¯ãActiveRecord ã®ãã¼ã¿ã¯ãããã« Perl ã§ã¯èªã¿è¾¼ããªãã ãããã©ããã以å¤ã¯èªã¿è¾¼ããããããªãããªãã¨ã ã¾ã㯠Ruby ã使ã£ã¦ memcached ã«ãã¼ã¿ã set ãã¾ãã #!/usr/bin/ruby require 'rubygems' require 'activerecord' require 'memcache' class Hoge < ActiveRecord::Base estab
ãããã¾ã§ãã å æ¥å ¬éããããã¸ã§ã¯ãã§åã㦠Memcached ã使ãã¾ããã Rails ãã使ãå ´å㯠cache_fu ã使ç¨ããã®ãä¸è¬çã ã¨æãã¾ãããfind ã§ã¯ãªã get_cache ã¨ããå°ç¨ã®ã¡ã½ããã使ç¨ããªãã¨ãã£ãã·ã¥ããã¾ããã ããã¯ã¡ãã£ã¨ã¤ã¤ã ãªãã¨æã£ãã®ã§ãfind ã¡ã½ããã§ãã£ãã·ã¥ãå¹ãããã«ãªããã©ã°ã¤ã³ãä½ã£ã¦ã¿ã¾ããã æ¦è¦ cache_fu (æ§ acts_as_cached) ãæ¡å¼µãããRuby on Rails ç¨ãã©ã°ã¤ã³ã§ãã find(id) ã find_by_xxx(value) ãããã¯ãã¦ãget_cache ãå®è¡ãããããã«ãã¾ãã ãªãã¸ã㪠http://github.com/morimori/cache_fu_find_hook/tree/master ä¾åããã©ã¤ãã©ãªã»ãã©ã°ã¤ã³ cache_fu
Debian etchã«memcachedãå°å ¥ããæã®ä½æ¥ã¡ã¢ã(æ¦è¦&ã¤ã³ã¹ãã¼ã«ç·¨) memcachedã¨ã¯ Cè¨èªã§æ¸ãããé«éãªãããã¯ã¼ã¯å¯¾å¿ã®åæ£ã¡ã¢ãªãã£ãã·ã¥ãµã¼ãã memcached - a distributed memory object caching system memcachedã®ç¹å¾´ ã·ã³ãã«ãªããã¹ããããã³ã« ã¡ã¢ãªã¹ãã¬ã¼ã¸ ã¯ã©ã¤ã¢ã³ãã©ã¤ãã©ãªã«ããåæ£ memcachedèªä½ã«åæ£æ©è½ã¯å®è£ ããã¦ããªãã memcachedã®ã¤ã³ã¹ãã¼ã« memcachedã¯ãã¤ãã³ããã³ããªã³ã°ã«libeventãå©ç¨ããã®ã§ãlibeventãã¤ã³ã¹ãã¼ã«ãã¾ãã $ sudo aptitude install libevent1 libevent-dev 次ã«memcachedãã¤ã³ã¹ãã¼ã«ãã¾ãããetchã®ããã±ã¼ã¸ã¯ãã¼ã¸ã§ã³ãå¤ã*1ã®ã§ãã½ã¼
ã¯ã¦ãªã°ã«ã¼ãã®çµäºæ¥ã2020å¹´1æ31æ¥(é)ã«æ±ºå®ãã¾ãã 以ä¸ã®ã¨ã³ããªã®éããä»å¹´æ«ãç®å¦ã«ã¯ã¦ãªã°ã«ã¼ããçµäºäºå®ã§ããæ¨ããç¥ãããã¦ããã¾ããã 2019å¹´æ«ãç®å¦ã«ãã¯ã¦ãªã°ã«ã¼ãã®æä¾ãçµäºããäºå®ã§ã - ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ ãã®ãã³ãæ£å¼ã«çµäºæ¥ã決å®ãããã¾ããã®ã§ã以ä¸ã®éãã確èªãã ããã çµäºæ¥: 2020å¹´1æ31æ¥(é) ã¨ã¯ã¹ãã¼ãå¸æç³è«æé:2020å¹´1æ31æ¥(é) çµäºæ¥ä»¥éã¯ãã¯ã¦ãªã°ã«ã¼ãã®é²è¦§ããã³æ稿ã¯è¡ãã¾ãããæ¥è¨ã®ã¨ã¯ã¹ãã¼ããå¿ è¦ãªæ¹ã¯ä»¥ä¸ã®è¨äºã«ãããã£ã¦æç¶ãããã¦ãã ããã ã¯ã¦ãªã°ã«ã¼ãã«æ稿ãããæ¥è¨ãã¼ã¿ã®ã¨ã¯ã¹ãã¼ãã«ã¤ã㦠- ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ ãå©ç¨ã®ã¿ãªãã¾ã«ã¯ãè¿·æãããããããã¾ãããã©ãããããããé¡ããããã¾ãã 2020-06-25 è¿½è¨ ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ã®ã¨ã¯ã¹ãã¼ããã¼ã¿ã¯2020å¹´2æ28
Railsã§ã»ãã·ã§ã³ã®ä¿åå ã¨ãã¦ãmemcacheã使ç¨ããå ´åãããã¾ãã ããããmemcachedãè½ã¡ã¦ãã¾ã£ãå ´åããµã¤ãã«ãã°ã¤ã³ã§ããªããã©ãã«ãèµ·ãã¦ãã¾ããªã©ã®æ¸å¿µãããã¾ãã ããã§epcachedã使ç¨ãã¦ã¿ããã¨æãã¾ãã â Repcachedã¨ã¯ï¼ memcachedã«ã¬ããªã±ã¼ã·ã§ã³æ©è½ã追å éåæã®ã¬ããªã±ã¼ã·ã§ã³ ãã«ããã¹ã¿ã®ã¬ããªã±ã¼ã·ã§ã³ããµãã¼ã(ãã¼ã¸ã§ã³2.0ãã) 詳細ãrepcachedã®ã¤ã³ã¹ãã¼ã«æé ã¯å ¬å¼ãµã¤ããåç §ãã¦ãã ããã http://lab.klab.org/wiki/Repcached â Railsã§ä½¿ããããã«ãã Railsã®ã¢ããªã±ã¼ã·ã§ã³ã§repcachedã使ç¨ããããã«ã¯ãmemcachedã¯ã©ã¤ã¢ã³ãã®ã¤ã³ã¹ãã¼ã«ã¨ã¢ããªã±ã¼ã·ã§ã³å´ã®è¨å®ãå¿ è¦ã§ãã memcachedã¯ã©ã¤ã¢ã³ãã®å°å ¥ rep
repcachedã«ã¤ã㦠repcachedã¨ã¯ãmemcachedã«ãã¼ã¿ã®ã¬ããªã±ã¼ã·ã§ã³æ©è½ã追å å®è£ ãããã®ã§ãã memcachedã¯ã以ä¸ã®ãããªã¨ããã«ãã使ãããã¨æãã¾ãã ä¸æçãªãã¼ã¿ã®ä¿åå ´æã¨ã㦠ãã£ãã·ã¥ãä¿åããå ´æã¨ã㦠RDBMSã®ãã¼ã¿ã®ãã£ãã·ã¥ çæãããã¼ã¸ãã¼ã¿ã®ãã£ãã·ã¥ ãããã®å ´åãæ¶ãã¦ãããã¼ã¿ãªã®ã§ãä¸ãä¸memcachedããã¦ã³ãã¦ãåé¡ã¯ãªãã¯ãã§ãã ããããå½±é¿ãå ¨ããªãããã§ã¯ããã¾ããã ä¾ãã°ãMySQLã®ãã¼ã¿ãmemcachedã§ãã£ãã·ã¥ãã¦ããå ´åãmemcachedããã¦ã³ãã¦ããéã¯ç´æ¥MySQLã«ã¢ã¯ã»ã¹ããããã¨ã«ãªãDBãµã¼ãã®è² è·ãä¸ããã¾ããã¾ããmemcachedãåèµ·åãã¦ãã£ãã·ã¥ã失ãããå ´åã¯ãåã³ãã£ãã·ã¥ãæºã¾ãã¾ã§ã¯DBãµã¼ãã«è² è·ãããããã¨ã«ãªã£ã¦ãã¾ãã¾ãã ãã®ããã«
install gem install memcache-client 試ããã®ã¯ãã¼ã¸ã§ã³1.8.3ã how to use require 'rubygems' require 'memcache' memcache_servers = ['192.168.1.11:11211', '192.168.1.12:11211', '192.168.1.13:11211'] memcache_options = { :timeout => 1, } cache = MemCache.new memcache_servers, memcache_options cache.set 'key', 'value' p cache.get 'key' options namespace åå空éãï¼ããã©ã«ãnilï¼ readonly èªã¿è¾¼ã¿å°ç¨ãæ¸ãè¾¼ãã ãMemCacheErrorï¼ããã©ã«ã
ã¯ã¦ãªã°ã«ã¼ãã®çµäºæ¥ã2020å¹´1æ31æ¥(é)ã«æ±ºå®ãã¾ãã 以ä¸ã®ã¨ã³ããªã®éããä»å¹´æ«ãç®å¦ã«ã¯ã¦ãªã°ã«ã¼ããçµäºäºå®ã§ããæ¨ããç¥ãããã¦ããã¾ããã 2019å¹´æ«ãç®å¦ã«ãã¯ã¦ãªã°ã«ã¼ãã®æä¾ãçµäºããäºå®ã§ã - ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ ãã®ãã³ãæ£å¼ã«çµäºæ¥ã決å®ãããã¾ããã®ã§ã以ä¸ã®éãã確èªãã ããã çµäºæ¥: 2020å¹´1æ31æ¥(é) ã¨ã¯ã¹ãã¼ãå¸æç³è«æé:2020å¹´1æ31æ¥(é) çµäºæ¥ä»¥éã¯ãã¯ã¦ãªã°ã«ã¼ãã®é²è¦§ããã³æ稿ã¯è¡ãã¾ãããæ¥è¨ã®ã¨ã¯ã¹ãã¼ããå¿ è¦ãªæ¹ã¯ä»¥ä¸ã®è¨äºã«ãããã£ã¦æç¶ãããã¦ãã ããã ã¯ã¦ãªã°ã«ã¼ãã«æ稿ãããæ¥è¨ãã¼ã¿ã®ã¨ã¯ã¹ãã¼ãã«ã¤ã㦠- ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ ãå©ç¨ã®ã¿ãªãã¾ã«ã¯ãè¿·æãããããããã¾ãããã©ãããããããé¡ããããã¾ãã 2020-06-25 è¿½è¨ ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ã®ã¨ã¯ã¹ãã¼ããã¼ã¿ã¯2020å¹´2æ28
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}