Advanced PHP Programming- P9

Tham khảo tài liệu 'advanced php programming- p9', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 378 Chapter 15 Building a Distributed Environment Client X get a fresh copy of Joe s page Newly Cached Figure Stale cache data resulting in inconsistent cluster behavior. Centralized Caches One of the easiest and most common techniques for guaranteeing cache consistency is to use a centralized cache solution. If all participants use the same set of cache files most of the worries regarding distributed caching disappear basically because the caching is no longer completely distributed -just the machines performing it are . Network file shares are an ideal tool for implementing a centralized file cache. On Unix systems the standard tool for doing this is NFS. NFS is a good choice for this application for two main reasons NFS servers and client software are bundled with essentially every modern Unix system. Newer Unix systems supply reliable file-locking mechanisms over NFS meaning that the cache libraries can be used without change. Caching in a Distributed Environment 379 Shopping Shopping Cart A Cart B Figure Inconsistent cached session data breaking shopping carts. The real beauty of using NFS is that from a user level it appears no different from any other filesystem so it provides a very easy path for growing a cache implementation from a single file machine to a cluster of machines. If you have a server that utilizes cache as its cache directory using the Cache_File module developed in Chapter 10 Data Component Caching you can extend this caching architecture seamlessly by creating an exportable directory shares cache on your NFS server and then mounting it on any interested machine as follows 380 Chapter 15 Building a Distributed Environment etc fstab nfs-server shares cache cache nfs rw noatime - - Then you can mount it with this mount -a These are the drawbacks of using NFS for this type of task It requires an NFS server. In most setups this is a dedicated NFS server. The NFS server is a single point

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
31    82    1    23-05-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.