Singleton in Cluster environment

前端 未结 9 474
南笙
南笙 2020-12-04 11:23

What is the best strategy to refactor a Singleton object to a cluster environment?

We use Singleton to cache some custom information from Database. Its mostly

9条回答
  •  遥遥无期
    2020-12-04 12:02

    Or something like memcached

    http://www.danga.com/memcached/

    What is memcached? memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.

    Danga Interactive developed memcached to enhance the speed of LiveJournal.com, a site which was already doing 20 million+ dynamic page views per day for 1 million users with a bunch of webservers and a bunch of database servers. memcached dropped the database load to almost nothing, yielding faster page load times for users, better resource utilization, and faster access to the databases on a memcache miss.

提交回复
热议问题