Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ TaurusDB/ User Guide/ Serverless Instances/ What Is a Serverless Instance?

What Is a Serverless Instance?

Updated on 2024-11-06 GMT+08:00

Context

The stability and reliability of databases are crucial in modern enterprise-level IT systems. If a database is not stable, the entire system cannot run properly. To solve such an issue, users typically configure various parameters and redundant resources (such as compute, memory, and storage).

However, during off-peak hours, those redundant resources are often left idle, resulting in wasted costs. Even with those configurations, there is still a risk of temporary resource shortages in the face of unexpected surges in workloads, which can compromise the overall system.

In addition to typical enterprise scenarios, there are also many low-frequency, small-scale database usage scenarios in the cloud, such as development and testing environments, mini-program development, and school laboratory teaching environments. In these scenarios, users often have minimal specification requirements but demand workload continuity. Constantly creating or deleting pay-per-use instances is not feasible, and buying low-spec yearly/monthly instances results in a significant waste of money when there are no workloads to process.

To address those concerns, GaussDB(for MySQL) has introduced serverless instances. These instances can dynamically adjust resources based on workloads and are billed on a pay-per-use basis, which reduces costs and improves efficiency. Additionally, serverless instances make it easier for small- and medium-sized enterprises to use cloud databases.

The following figure shows the resource usage and specification changes of regular and serverless instances during significant workload fluctuations.

Figure 1 Resource usage and specification changes of regular and serverless instances

As seen in the figure, regular and serverless instances perform differently during significant workload fluctuations.

  • Regular instances: Resources are wasted during off-peak hours and insufficient during peak hours, which will affect workloads.
  • Serverless instances: The specifications are adjusted based on workload demands to achieve minimal resource wastes. Even during peak hours, workload demands can still be met, ensuring workload continuity and improving system stability.

How a Serverless Instance Works

GaussDB(for MySQL) serverless instances use a write once read many (WORM) architecture and shared storage. They provide the ability to dynamically scale with system workloads. Each instance node can achieve vertical scaling of vCPUs and memory in seconds and horizontal scaling of read replicas, allowing you to quickly and independently change compute capabilities during peak and off-peak hours. This helps you quickly respond to workload changes less expensively and more efficiently.

Figure 2 Serverless architecture
  • Both the primary node and read replicas are serverless. They use distributed shared storage and can be scaled based on workload changes.
  • The billing unit is TCU. 1 TCU is approximately equal to 1 vCPU and 2 GB of memory. When the primary node or a read replica is scaled, its TCU increases or decreases accordingly.
  • When creating a serverless instance, you can specify a TCU range, instead of configuring specific specifications. Then the instance can be scaled based on the CPU usage and memory usage.

    Vertical scaling: The node performance (CPU and memory specifications) changes.

    Cloud Eye monitors the CPU usage and memory usage of serverless instances. If any of the following conditions is met, a scale-up is automatically triggered:

    • The CPU usage is greater than 80% for 5 seconds and it has been at least 5 seconds since the last scale-up.
    • The memory usage is greater than 80% for 5 seconds and it has been at least 5 seconds since the last scale-up.
    • The CPU usage is greater than 60% for 20 seconds and it has been at least 10 seconds since the last scale-up.

    If the following condition is met, a scale-down is automatically triggered:

    The CPU usage is less than 30% for 15 seconds and it has been at least 15 seconds since the last scale-down.

    Horizontal scaling: The number of read replicas changes.

    If the compute has already been scaled up as much as possible but the CPU or memory usage still meets a compute scale-up condition, read replicas will be added.

    If the compute has already been scaled down as much as possible but the CPU or memory usage still meets a compute scale-down condition, read replicas will be removed.

Billing

For details, see Serverless Billing.

Advantages

  • Lower cost: GaussDB(for MySQL) serverless instances do not depend on other infrastructure or related services. They can be used right out of the box and provide stable and efficient data access services. You are only billed for the resources you use.
  • Larger storage space: The storage space of a serverless instance can reach up to 32,000 GB. It is automatically scaled up based on the data volume of the instance to avoid any impacts on workloads due to insufficient storage resources.
  • Auto scaling of compute resources: Compute resources required for read and write operations can be scaled automatically, greatly reducing O&M costs and system risks.
  • Fully managed and O&M-free experience: All O&M work, such as specification scaling, storage autoscaling, monitoring and alarms, and intelligent O&M, is completed by Huawei Cloud professional teams. Users will not even notice, and their workloads will not be affected, ensuring continuous availability and a truly O&M-free experience.

Application Scenarios

  • Infrequently-used databases in enterprise testing environments and personal development
  • Intermittent scheduled tasks, such as data statistics and archiving, school teaching, and R&D
  • Unpredictable fluctuations in workloads, such as check-in and edge computing
  • O&M-free or fully managed databases
  • Lower database usage costs during off-peak hours

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback