pecl中的memcache和memcached

來源:互聯網
上載者:User

著作權聲明:原創作品,允許轉載,轉載時請務必以超連結形式標明文章原始出版、作者資訊和本聲明。否則將追究法律責任。http://blog.csdn.net/mayongzhan - 馬永占,myz,mayongzhan

 

pecl中的memcache和memcached

 

memcache支援

failover 容錯移轉
chunk_size 資料轉送大小
default_port 連接埠
hash_strategy hash策略
hash_function hash函數
session_handler session支援
compressed 壓縮

 

 

 

memcached支援

opt_compressed 最佳化壓縮

opt_serializer 序列化,支援php_serializer和igbinary形式,後者傳說是效能優秀的可替代php原生serializer的東西. igbinary詳細請見http://opensource.dynamoid.com/

opt_prefix_key key的首碼

opt_hash hash函數支援:default,md5,crc,fnv1_64,fnv1A_64,fnv1_32,fnv1A_32,hsieh,murmur,老外就是猛,寫這麼多函數.

opt_distribution 分布(就是hash策略):modula,consistent,libketama_compatible,這裡有提示說ketama是未來趨勢,下一版不出什麼意外就是預設值.

opt_buffer_writes 緩衝寫

binary_protocol 二進位傳輸.

no_block 非同步傳輸

tcp_nodelay 某些環境下的最佳化

socket_send_size socket_recv_size 發送大小

connect_timeout 連線逾時(memcache也有,是在connect的時候出現的)

retry_timeout send_timeout, recv_timeout, poll_timeout

cache lookups dns緩衝尋找,我怎麼感覺越來東西越亂…

server_failure_limit 伺服器串連失敗次數限制

res_success,res_failure等等一些錯誤資訊,這個就體現出來memcached相當的oo了.

 

 

 

我感覺是後者更先進一些,而且使用的還是被廣泛應用的libmemcached.libmemcached目前已經支援了3p+ruby.

 

 

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.