tencent cloud

Feedback

Simulating Self-Built MySQL Crash Through Network Blocking

Last updated: 2024-09-26 15:47:38

    Background

    In migration to cloud platforms in the early stage, cost will be considered and some middleware will be built as production environment by reusing CVM. But with increase of business size, in subsequent businesses, Self-Built middleware will be gradually replaced with cloud middleware so that the high availability of the middleware can be improved. For a Self-Built middleware, its high availability can be verified by injecting a network blocking fault.

    Experiment Objectives

    Verify the high availability of Self-Built MySQL.

    Architecture

    Use Keepalived+MySQL form to achieve multi-site high availability of MySQL. 

    Create an Experiment

    Step 1: Confirm Fault Injection Objectives

    Select injection objective as Master based on the architecture, check if switch to Slave is allowed when Master is confronted with network blocking, and if business insensitivity to faults is achieved. 

    Step 2: Create an Experiment

    1. Log in to the Tencent Smart Advisor > Chaotic Fault Generator, go to the Experiment Management page, and click Create a New Experiment.
    2. Click Skip and create a blank experiment, and fill in the basic information of the experiment.
    3. Configure Experiment Object, select CVM under host type for Experiment Resource Object, and add an instance. Select Intra-host network packet loss for experiment actions.
    Configure action parameters in the Action Parameters page, because the target port for this experiment is 3306 and the private network interface is eth0. To accurately block a specified port, specified parameters must be configured. After configuration, click Confirm to go to the next step.
    4. Configure Monitoring Metrics (optional): Some basic CVM metrics can be configured to allow metrics selection.
    5. Complete experiment tasks creation.

    Start an Experiment

    1. Check if businesses are at a normal state before starting. Try connection to check that the Master node is normal and can be connected.
    2. In an Experiment Action Group, click Execute to execute an experiment.
    3. After fault injection, check if business connection is normal.
    4. Execute fault recovery actions to recover the state before the fault.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support