Caching: -
Whenever any user opens website to land on
website. Their web browsers sends request for the page to server. The requested
server then processes this request and compiles the webpage and sends back to
the web browser. If your website is receiving low web traffic, your server will
process each request without having noticeable impact. Caching is a process of
constantly-accessing data in temporary cache. Every time visitor requests this data,
it will served from cache rather than server. If the data is not cached, the
request will sent to the server. However, on way back to web browser. A copy of
data will be stored in cache. It ensure that cached copy is available. Caching
can boost your website performance even in heavy traffic. This makes website
easier to scale and handle unexpected spikes.
Introduction of
Memcached: -
Memcached is an open source persistent
object tool. Memcached stores objects to reuse between web page loads. Memcached
keeps data in RAM (real access memory) which reduces numerous times the
database to read.
Memcached Solutions:
-
Memcached belongs to NoSQL family of data
management solutions. It stores all data based key-value pairs. It includes API
calls and database calls. Memcached is particularly useful when same piece of
data requested periodically. Memcached can deliver significant performance when
cost of content is high.
Memcached object
caching solution working: -
- Memcached uses client-server architecture on four components. The first component is client-server that retains list of available memcached servers.
- Whenever client receives query, it will first check whether data exists in cache. If data is already available. Memcached will return to client without interrupting database. If data isn’t cached, Memcached forwards request to database.
- To help in distributing load, typically Memcached implementation consists of different server and its clients. It uses client-based hashing algorithm to match each request to appropriate server.
- Memcached server software stores key/ value combinations for numerous factors. It includes API calls, web page rendering and results of database calls.
- Lastly Memcached uses least recently used LRU algorithm. This algorithm helps prevent cache from growing indefinitely by finding least recently used objects.
- LRU works on linked list. Whenever a list entry is accessed and updated. It gets removed from list and attacked to list head. This means entries at bottom of list are less recently used than at the top of list. Whenever it needs to reuse memory. It will remove entries from bottom of the list.
In more simple way, memcached stores
results of database query. This results whenever same query is requested,
memcached will response without requesting to process. At HTS Hosting we offer
all hosting plans works with memcached technology. Our plans are Linux shared web hosting,
Linux Dedicated
Hosting, windows
dedicated hosting and other hosting plans.
Source:https://www.htshosting.org/knowledge-base/technology/90/memcached-and-need-of-memcached
No comments:
Post a Comment