Several points of focus on the transformation of single-machine system into cluster deployment

Source: Internet
Author: User
Tags redis jboss

A stand-alone web system that needs to be replaced when deployed in a cluster requires the following considerations:

1. Cache

When a single machine, usually cache in the local memory, the cluster environment, the cache between the processes can not communicate, you may consider the use of distributed cache, or memory database, distributed cache can consider memcached, or JBoss cache, memory database can consider Redis, Depending on the scenario, different distributed caches are used, and for situations where real-time requirements are high, a replicated distributed cache like JBoss cache can be used, and the JOBSS cache uses network multicast to replicate to other nodes when the cache content of one node is changed. In this way, each application node accesses the local memory while accessing the cache, and when the data consistency requirement is high, it can use similar Redis memory database, the problem is that each access has network overhead;

2. Time synchronization

As the name implies, in the cluster of nodes, to make time synchronization, using NTP service, otherwise there will be a lot of inexplicable problems;

3. File access

To ensure the consistency of the file access of each node, two ideas, one is to use the database storage files, such as MongoDB file access, one is to set up a file sharing system, such as Windows file sharing, or Linux NFS system;

4. Background thread

To control the contention and conflict of resources by the background thread of each node of the cluster, which is related to the specific business, perhaps there is no framework solution, the application should control the contention and conflict, or adopt the node's heartbeat, the surviving node to perform the background task control (a single node to perform background tasks, according to a certain strategy, Take turns to get the execution authority of background tasks);

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.