memcached

A collection of 4 posts

nginx

Rails production hosting 數據分享

稍微分享一下最近一個 rails project hosting 的數據,站上同時有約6000人,有大量使用 view cache。 環境架設部分 nginx + unicorn (worker * 4) memcached server 512 MB(同一台機器...) Linode 2G 這是一個純新聞媒體的網站,觀察這樣架構下,面對同時 6000 人,機器 loading 大概約50%不到,粗估是可以到萬人以上水準。 若 memcached 搬出去,再把 worker 數量增加兩個,相信會再更好 :D

  • hothero
    hothero
subdomain

Cross-SubDomain Cookie for Laravel

許多時候一個團隊會 hosting 許多平台,且往往各平台間都是有所關聯,像是 flyingv 還有 VShop, VEvent。其會員資料庫都是共用,且同樣的登入方式。若在平台間瀏覽操作需要一直重新登入,是否也太令人不悅了~ 因此可以設定這些平台的 cookie (通常登入判斷的資訊都會存於此)為同樣的 Domain,不同的 Sub Domain。例如 domain name 為 example.com,其他平台是 shop.example.com, event.example.com, ... 此處在 Laravel 的設定主要相關三個檔案 app/config/app.php, app/config/cache.

  • hothero
    hothero
php

Memcached Server & Client Installation on MAMP & Ubuntu

memcached是一套分布式的高速缓存系統,通常只是當作快取系統使用,所以使用memcached的應用程式在寫回較慢的系統時(像是後端的資料庫)需要額外的程式碼更新memcached內的資料。(reference from wiki) 預計完成的安裝環境 libevent (memcached requirement) Memcached 1.4.15 Server, download it PHP Memcached extension 2.10, download it Memcached Server In MAMP: brew install libevent tar -zxvf memcached-1.4.15.tar.gz cd memcached-1.4.15/

  • hothero
    hothero
You've successfully subscribed to hothero's TechNote!