Key concepts

更新时间:
复制 MD 格式

This topic describes the key concepts of Application High Availability Service (AHAS).

What is an AHAS environment?

AHAS uses environments to isolate resources for specific contexts, such as production, testing, and development. An environment contains all AHAS resources for that context.

AHAS environments are region-specific. Each region has a Default environment, and you can also create custom environments.

What is a probe?

AHAS includes the following two types of probes:

  • AHAS probe: A standalone process installed on your operating system to collect architecture information. You must install this probe to use Topology Awareness and Fault Drill.
  • AHAS Java probe: A Java probe for the Java Virtual Machine (JVM) that uses bytecode enhancement to enable real-time monitoring and Flow Protection. You can install this probe if you need to use the Flow Protection feature.

Architecture and architecture components

  • An architecture has two dimensions: horizontal and vertical.

    • Horizontal architecture: the topology of processes, containers, and hosts

    • Vertical architecture: the dependency relationships between processes, containers, and hosts

  • An architecture component is a building block of an architecture. Components include processes (application processes, third-party component processes, and cloud services), containers, and hosts.

What is Fault Drill?

Based on Chaos Engineering principles and Alibaba's best practices, Fault Drill offers a wide range of fault scenarios to improve the fault tolerance and recoverability of distributed systems.

The following table describes related terms.

Term

Description

drill

A complete, executable workflow configuration.

draft

A drill that is not fully configured or has unsaved changes.

drill task

A record created each time a drill runs.

drill report

The result of a drill task.

phase

A collection of activities. A drill consists of four phases that are executed sequentially. Each phase contains multiple activities.

activity

A runnable node in a drill workflow. A drill is composed of multiple activities.

drill parameter

A parameter required for an activity to run. Parameters determine the execution result of an activity.

drill target

The target host or device for a drill. Targets are defined per activity, allowing different activities to have different targets.

scenario

A category for activities. For example, high disk usage and high disk I/O are both part of the disk scenario.

tag

A custom label that you define for a drill. You can add multiple tags to a drill to categorize and manage your drills.

What is a resource?

In AHAS, a resource is any code block that you define with the application protection SDK. You can then apply Flow Protection rules to these resources.

In most cases, you can use a method signature, a URL, or a service name to identify a resource. A resource can be anything within a Java application, such as a Dubbo service or HTTP API provided by your application, a service call to another application, or even a specific block of code.

Example:

The following code shows how to define a resource by using the SDK.

Entry entry = null;
try {
    entry = SphU.entry("HelloWorld");
    // Your business logic
    System.out.println("hello world");
} catch (BlockException e1) {
   // Handle the case where the resource is blocked
    System.out.println("block!");
} finally {
    if (entry != null) {
         entry.exit();
    }
}
            

After you call this resource, you can view the HelloWorld resource in the AHAS console.

What is a rule?

In AHAS, you can define rules based on the real-time status of your applications and resources. These rules include flow control rules, degradation rules, and System Protection rules.

Rules are pushed to each machine where the application or resource is located and take effect locally. You can dynamically adjust them in real time through the console.

What is flow control (or throttling)?

Flow control protects your application's availability from sudden traffic spikes. It uses traffic-shaping methods like throttling, which blocks requests when traffic exceeds a specified threshold. Other methods include cold start and peak shaving.

Circuit breaking and degradation

When a service becomes unstable (indicated by a high response time or error ratio), circuit breaking rules can degrade the service or trip a circuit breaker. This isolates the unstable service and prevents cascading failures.

What is System Protection?

System Protection controls an application's inbound traffic based on four system performance dimensions, such as load, RT, QPS, and thread count, to allow the system to operate at its maximum throughput while ensuring stability.

What is a feature toggle?

A feature toggle is a lightweight framework for modifying configurations dynamically at runtime. You can use it to centrally manage business switches for your applications or to handle basic runtime configurations.

Use cases for feature toggles

  • Business switch management: Use toggles to dynamically control business logic, allowing you to change application behavior at runtime without redeploying. This is especially useful for complex services that consist of multiple systems.

  • Runtime configuration management: Instead of hard-coding values like URLs, interface names, thresholds, file encodings, or allowlists and blocklists, you can use feature toggles to create and manage dynamic configurations that can be updated at runtime.