18 March, 2023

What Is High Availability? How to Set Up a High Availability System

Quick summary: High availability means a high level of availability.

Today, information technology is essential for improving a business's competitiveness and results. Computer networks therefore need to stay up and highly available. High availability exists to give a dependable connection between customers and the business. The definition of What is High availability? Read on as Mona Media is explained in the article below.

What is High availability?

High availability means a high level of availability: devices or web server are always ready to serve, which minimizes the chance of the whole system being interrupted. Put simply, High availability is a process, solution or technology that keeps an application or database accessible 24/7 under all conditions.

To do this, the setup needs at least 2 servers running in parallel and working continuously. If one server fails, the other takes over so the system keeps working normally.

Benefits of High availability

Benefits of High availability

Customers can reach the website anytime, anywhere without worrying about interruptions. All data on the server is protected and stored in several locations. When an incident happens on VPS hosting it does not cause much disruption or serious data loss.

Thanks to the copies on hosting stored across several clusters, when one VPS fails another VPS takes over. This keeps the system running continuously.

Common High availability solutions

For a database in MS SQL Server there are 5 High availability solutions: Replication, Log Shipping, Mirroring, Clustering and AlwaysOn Availability Groups.

Replication

With this solution, the source data is copied to the destination through copy jobs (agents), using object-level technology.

Some Replication terms:

  • Distributor: optional. It stores the replicated data for the Subscriber.
  • Publisher: the source server.
  • Subscriber: the destination server.

Log Shipping

Through Transaction Log backup jobs, the source data is copied to the destination, using database-level technology.

Terms you need to know:

  • Secondary Server: the destination server.
  • Primary Server: the source server.
  • The server that monitors, and is monitored by, the Log Shipping state. This server type is optional.

Clustering

This High availability setup uses data stored in a shared location, used by both the secondary and primary servers. The solution uses instance-level technology and requires Windows Clustering on the shared storage.

Terms you need to know:

  • Passive Node: where SQL Services do not run.
  • Active Node: where SQL Services run.

Mirroring

Setting up High availability for database in MS SQL Server lets you copy primary data to the secondary over network transactions, with the support of mirroring endpoints and port numbers, using database-level technology.

Terms to know:

  • Mirror Server: the destination server.
  • Principal Server: the source server.
  • Witness Server: used for automatic failover solutions. This server is optional depending on what the user needs.

AlwaysON Availability Groups

Primary data is moved to the secondary over network transactions, using database-group-level technology. With this approach, Windows Clustering does not need shared storage.

Steps to configure High availability for Mirroring and Log Shipping

Step 1: Take a full backup and a T-log backup of the source database.

Take a full backup and a T-log backup of the source database.

Example:

The Log Shipping/Mirroring configuration uses a database named TestDB with the following details:

  • SQL Server: Primary server
  • Testinstance: Source server
  • Devinstance: Secondary server

To take the full backup and T-log backup on the source server, connect to the SQL Server instance Testinstance, open a new query and run the following code:

Backup database TestDB to disk = 'D:testdb_full.bak'

GO

Backup log TestDB to disk = 'D:testdb_log.trn'

Step 2: Copy the backup files to the destination server

Copy the backup files to the destination server

In the example above, there is one physical server with 2 SQL Server instances, so no copying is needed. If your 2 SQL Server instances are on 2 physical servers, you need to copy the 2 files to the secondary server, where Devinstance is installed.

Step 3: Restore the database from the backup files on the destination server with the norecovery option.

Restore the database

Example:

  • Connect to the SQL Server instance Devinstance.
  • Open a New Query.
  • Write the following code to restore the whole database named TestDB. Because the name matches the source database, use a different name for the Log Shipping configuration.
  • To restore, choose norecovery

Restore database TestDB from disk = 'D:TestDB_full.bak'

with move 'TestDB' to 'D:DATATestDB_DR.mdf',

move 'TestDB_log' to 'D:DATATestDB_log_DR.ldf',

norecovery

GO

Restore database TestDB from disk = 'D:TestDB_log.trn' with norecovery

Then click Refresh on the database folder of the Devinstance server and you will see that the TestDB database has been restored.

Step 4: Configure High availability (Mirroring/Log Shipping)

Configure High availability (Mirroring/Log Shipping)

Example:

  • Right-click the TestDB database on the source server and choose Properties.
  • A screen will appear
  • Choose Transaction Log Shipping or Mirroring depending on your requirements, and follow the on-screen steps to finish the configuration.

Building a High availability system

building a High availability system

As explained above, High availability needs at least 2 servers running in parallel to pass information along without interruption. So when you build a High availability solution, plan for failures and design redundancy wherever you need it:

  • Redundant paths from the workstation to the routers at the building access layer.
  • Redundant routes inside and between network components.
  • Redundant servers for the server farm modules.
  • Redundant communication links at the access layers.

Server redundancy

This server is installed in a network that has to store important information. Normally the backup server stays offline. When the main server fails, the backup server is switched on.

Router redundancy

Redundant routes are designed for two main purposes: higher availability and load balancing.

Load balancing

This splits the work of one device across several devices so requests are handled faster and more efficiently.

In practice, the websites of large businesses often run into traffic problems, so load balancing is a necessary solution that routes access requests to different host servers.

Most IP routing protocols balance load over parallel links. So use the maximum number of paths and change the number of links for the router to balance the load; the default is 4 and the maximum is 6 paths.

Usually, for every 2 servers used for load balancing, 1 more server is needed to decide which server takes on which job. Load balancing therefore needs several devices to set up, and they are integrated with backup and data redundancy services. In some cases the devices are even placed in different locations.

Increasing Availability

This is an important factor in any network. There are 4 main principles: Redundancy, Entanglement, Awareness and Persistence (REAP).

  • Redundancy: always keep a spare for every device.
  • Entanglement: inside the system each part handles one job, so the parts must be connected to keep operation consistent.
  • Awareness: lets customers reach the business's information quickly with no obstacles. Ways to do this include manual adjustment, DNS advertising, load balancing and dedicated service methods such as DFS.
  • Persistence: keeps the system running at all times. There are 3 steps: detect incidents promptly, switch over to another server, and reconnect with the person accessing it.

Link Media Redundancy

Devices in a switched network can be linked redundantly to reduce network downtime. But this can cause problems such as a broadcast storm (many broadcast packets being sent). So some algorithms are needed to optimize operation between 2 network stations. A typical one is the Spanning Tree Protocol (STP).

STP makes sure that only one optimal path is active between 2 network stations at any time. The other paths stay on standby and are activated when the main path has a problem.

Conclusion

This article shared our notes on What is High availability? and how to build a High availability system. We hope it gives you useful information and a better experience browsing the web.

High availability FAQ

What is High availability?
High availability means a high level of availability.
About The MONA Group: Founded in 2016, with more than 200 staff, MONA has delivered 14,000+ projects with an 85% client retention rate. MONA provides website design, full-scope SEO, custom software and AI automation solutions for businesses. Consulting hotline: 1900 636 648. Explore MONA SEO services and AI tools at work.
MONA has a podcast: listen instead of readingEpisodes on AI, automation & SEO for Vietnamese businesses
Nghe ngay
About the author

CEO & Founder · The MONA

Founder of The MONA, who built a services company of 200+ staff with 14,000+ projects delivered. Khánh Hùng shares how he thinks about building systems that run themselves, automating a business, and the real lessons from delivering projects at MONA.

Views 1,5K
Rate this article 4,8/5 · 21 ratings

Professional website
design services

Own a website with a beautiful, 100% exclusive design and a lifetime warranty, with the ability
to expand features flexibly as your business grows, starting today!

Contact Mona

    MONA có riêng một Người "Bạn Thân" cho bạn - Người Account sẽ đồng hành, hỗ trợ, hướng dẫn, đặt đồ ăn cho bạn mãi mãi, từ đây về sau!
    MONA will never sell your information or send you spam
    Đội MONA tư vấn hệ thống quản lý giáo dục trực tuyến
    Hỏi đáp giáo dục 4.0
    Tạo cuộc hẹn miễn phí với MONA để giải đáp và tư vấn mọi thắc mắc về giải pháp số hoá ngành giáo dục
    Thời lượng cuộc hẹn
    45 Phút
    Ngày và giờ
    Thứ 2, ngày 25 tháng 12, 2023
    [9:30 - 10:15]

      Chọn ngày và giờ
      Khung giờ
      Back
      Hãy cho MONA biết bạn là ai
      0:00