related-skills: cncf-aws-dynamodb, cncf-aws-ecr, cncf-aws-rds, cncf-aws-s3
Vitess in Cloud-Native Engineering
Category: Database
Status: Active
Stars: 10,000
Last Updated: 2026-04-22
Primary Language: Go
Documentation: Database clustering system for horizontal scaling of MySQL
Purpose and Use Cases
Vitess is a core component of the cloud-native ecosystem, serving as of MySQL
What Problem Does It Solve?
Vitess addresses the challenge of horizontal scaling of MySQL for large-scale deployments. It provides MySQL compatibility, horizontal scaling, and high availability.
When to Use This Project
Use Vitess when need MySQL scaling, require high availability, or manage large datasets. Not ideal for simple deployments or when MySQL horizontal scaling, sharding requirements, or large-scale deployments.
Key Use Cases
- MySQL Horizontal Scaling
- Database Sharding
- High Availability MySQL
- Multi-Region Deployments
- Cloud-Native MySQL
Architecture Design Patterns
Core Components
- VTGate: Query routing layer
- VTTablet: MySQL wrapper
- VTController: Cluster management
- Keyspace: Logical database
- Shard: Data partition
Component Interactions
- Client → VTGate: Client queries VTGate
- VTGate → VTTablet: VTGate routes to tablets
- VTTablet → MySQL: VTTablet manages MySQL
- VTController → VTTablet: VTController manages tablets
Data Flow Patterns
- Query Routing: Query → VTGate → VTTablet → MySQL
- Shard Placement: Keyspace → Shard → VTTablet → MySQL
- Replication: MySQL master → MySQL replicas
- Failsafe: VTTablet detects failure → Promote replica
Design Principles
- MySQL Compatible: Full MySQL protocol
- Horizontal Scaling: Shard and scale
- High Availability: Automatic failover
- Operational Simplicity: Easy to operate
Integration Approaches
Integration with Other CNCF Projects
- MySQL: Primary database
- Kubernetes: Deployment platform
- Vitess Operator: Kubernetes operator
- Prometheus: Metrics collection
API Patterns
- MySQL Protocol: MySQL client protocol
- VTGate Protocol: VTGate internal protocol
- VTTablet API: Tablet management API
- Keyspace API: Keyspace management API
Configuration Patterns
- VTGate Config: VTGate configuration
- VTTablet Config: Tablet configuration
- Keyspace Config: Keyspace configuration
- Shard Config: Shard settings
Extension Mechanisms
- Custom Sharding: Custom sharding logic
- Custom Replication: Custom replication logic
- Custom VTGate Plugins: Custom query routing
Common Pitfalls and How to Avoid Them
Misconfigurations
- Shard Split: Shard split failures
- How to Avoid: Monitor shard splits, use proper tools
- VTGate Memory: VTGate high memory usage
- How to Avoid: Configure memory limits, optimize queries
Performance Issues
- Schema Changes: Schema change issues
- How to Avoid: Use Vitess schema management, test changes
- VTTablet Issues: Tablet health issues
- How to Avoid: Monitor tablet health, check MySQL status
Operational Challenges
- Performance Issues: Query performance
- How to Avoid: Optimize queries, add indexes, monitor slow queries
- Failover Issues: Failover problems
- How to Avoid: Test failover, verify replica health
Security Pitfalls
Coding Practices
Idiomatic Configuration
- Shard Key Design: Design efficient shard keys
- Schema Management: Use Vitess schema management
- Connection Management: Manage connections efficiently
API Usage Patterns
- vtctl: Vitess control utility
- mysql client: MySQL protocol client
- VTGate API: VTGate API
- Vitess Operator: Kubernetes operator
Observability Best Practices
- Vitess Metrics: Monitor Vitess performance
- MySQL Metrics: MySQL performance metrics
- Replication Metrics: Track replication health
Testing Strategies
- Integration Tests: Test Vitess functionality
- Failover Tests: Test failover scenarios
- Performance Tests: Validate performance
Development Workflow
- Local Development: Use vitess local cluster
- Debug Commands: Check VTGate and tablet logs
- Test Environment: Set up test cluster
- CI/CD Integration: Automate testing
- Monitoring Setup: Configure observability
- Documentation: Maintain documentation
Fundamentals
Essential Concepts
- Keyspace: Logical database
- Shard: Data partition
- VTGate: Query router
- VTTablet: MySQL wrapper
- Replication: MySQL replication
- Failsafe: Automatic failover
- Topology Service: Cluster state storage
- VSchema: Sharding schema
Terminology Glossary
- Keyspace: Logical database
- Shard: Data partition
- VTGate: Query router
- VTTablet: Tablet
- Failsafe: Failover mechanism
Data Models and Types
- Keyspace: Keyspace configuration
- Shard: Shard configuration
- VSchema: Sharding schema
- Tablet: Tablet state
Lifecycle Management
- Query Flow: Client queries → VTGate → VTTablet → MySQL
- Shard Split: Split initiated → New shards → Data copied → Cutover
- Failover: Failure detected → Replica promoted → Traffic routed
- Upgrade: Rolling upgrade → New version
State Management
- Keyspace State: Available, splitting, or merging
- Shard State: Primary, replica, or spares
- VTTablet State: Master, replica, or spare
- VTGate State: Healthy or degraded
Scaling and Deployment Patterns
Horizontal Scaling
- Shard Scaling: Add shards for more capacity
- VTGate Scaling: Scale VTGate instances
- Replica Scaling: Add replicas for read scale
- MySQL Scaling: Scale MySQL instances
High Availability
- Shard HA: Multiple replicas per shard
- VTTablet HA: Tablet failover
- VTGate HA: VTGate cluster
- MySQL HA: MySQL replication
Production Deployments
- Cluster Setup: Deploy Vitess cluster
- Network Configuration: Configure network
- Security Setup: Enable authentication
- Monitoring Setup: Configure metrics
- Logging Setup: Centralize logs
- Backup Strategy: Configure backups
- Resource Quotas: Set resource limits
- Performance Tuning: Optimize settings
Upgrade Strategies
- Vitess Upgrade: Upgrade Vitess components
- MySQL Upgrade: Upgrade MySQL version
- Rolling Upgrade: Rolling component upgrade
- Testing: Verify functionality
Resource Management
- CPU Resources: CPU limits
- Memory Resources: Memory limits
- Storage Resources: MySQL storage
- Network Resources: Network configuration
Additional Resources
- Official Documentation: https://vitess.io/docs/
- GitHub Repository: Check the project's official documentation for repository link
- CNCF Project Page: cncf.io/projects/cncf-vitess/
- Community: Check the official documentation for community channels
- Versioning: Refer to project's release notes for version-specific features
Troubleshooting
Common Issues
Deployment Failures
- Check pod logs for errors
- Verify configuration values
- Ensure network connectivity
Performance Issues
- Monitor resource usage
- Adjust resource limits
- Check for bottlenecks
Configuration Errors
- Validate YAML syntax
- Check required fields
- Verify environment-specific settings
Integration Problems
- Verify API compatibility
- Check dependency versions
- Review integration documentation
Getting Help
- Check official documentation
- Search GitHub issues
- Join community channels
- Review logs and metrics
Content generated automatically. Verify against official documentation before production use.
Examples
Vitess Keyspace Configuration
# Vitess keyspace configuration for a sharded database
{
"keyspace": {
"name": "commerce",
"sharding_column_name": "user_id",
"sharding_column_type": "INT64",
"served_froms": [
{
"cell": "zone1",
"type": "BACKUP"
}
]
},
"vindexes": {
"hash": {
"type": "hash"
},
"numeric": {
"type": "numeric"
}
},
"tables": {
"users": {
"column_vindexes": [
{
"column": "user_id",
"name": "hash"
}
]
},
"orders": {
"column_vindexes": [
{
"column": "order_id",
"name": "numeric"
}
]
}
}
}
Vitens VTGate Configuration
# VTGate configuration for connection routing
vtgate:
port: 15001
grpc-port: 15000
auth-module: none
cell: zone1
root-zone: zone1
enable-gtids: true
enable-partial-route: true
enable-planning-trace: true
tablet-layout-timeout: 1m
tablet-layout-refresh: 10s
query-cache-size: 10000
query-log-sampling-rate: 1
stream-pool-size: 100
enable-separate-cache: true
enable-native-sharding: true
enable-pkid-sharding: true
Vitess VSchema Example
{
"commerce": {
"sharded": true,
"vindexes": {
"hash": {
"type": "hash"
}
},
"tables": {
"users": {
"column_vindexes": [
{
"column": "user_id",
"name": "hash"
}
],
"auto_increment": {
"column": "user_id",
"type": "VTAUTO"
}
},
"products": {
"column_vindexes": [
{
"column": "product_id",
"name": "hash"
}
]
},
"orders": {
"column_vindexes": [
{
"column": "order_id",
"name": "hash"
}
],
"column_vindexes": [
{
"column": "user_id",
"name": "hash"
}
]
}
}
}
}
When to Use
Use this skill when:
- Integrating a CNCF project into Kubernetes infrastructure — You need to configure, deploy, or troubleshoot a cloud-native tool within a cluster
- Designing cloud-native architecture — You are selecting and integrating CNCF tools to solve specific infrastructure challenges
- Resolving operational issues — A CNCF component is misbehaving, underperforming, or needs configuration changes
Core Workflow
Assess Requirements — Understand the use case, scale, integration needs, and existing infrastructure. Checkpoint: Document requirements, constraints, and success criteria.
Design Architecture — Plan component interactions, data flow, and deployment strategy using cloud-native best practices. Checkpoint: Verify the architecture addresses all requirements and follows CNCF conventions.
Implement & Configure — Create manifests, configurations, and deployment scripts. Include resource limits, health checks, and observability hooks. Checkpoint: Validate all YAML against schema and test in a staging environment.
Deploy & Monitor — Apply manifests to the cluster, verify component health, and confirm observability is working. Checkpoint: Confirm all pods/services are running, probes passing, and metrics/alerts configured.
Constraints
MUST DO
- Include at least one complete working YAML manifest example
- Note when content is auto-generated vs. manually verified
- Reference relevant CNCF project documentation
MUST NOT DO
- Deploy manifests without testing in a staging environment first
- Use deprecated API versions (e.g., apps/v1beta1)
- Omit resource limits and requests in Kubernetes manifests
1---2name: vitess3description: "Provides Vitess in Database clustering system for horizontal scaling of MySQL"4license: MIT5---678910 related-skills: cncf-aws-dynamodb, cncf-aws-ecr, cncf-aws-rds, cncf-aws-s3111213# Vitess in Cloud-Native Engineering1415**Category:** Database 16**Status:** Active 17**Stars:** 10,000 18**Last Updated:** 2026-04-22 19**Primary Language:** Go 20**Documentation:** [Database clustering system for horizontal scaling of MySQL](https://vitess.io/docs/) 2122---2324## Purpose and Use Cases2526Vitess is a core component of the cloud-native ecosystem, serving as of MySQL2728### What Problem Does It Solve?2930Vitess addresses the challenge of horizontal scaling of MySQL for large-scale deployments. It provides MySQL compatibility, horizontal scaling, and high availability.3132### When to Use This Project3334Use Vitess when need MySQL scaling, require high availability, or manage large datasets. Not ideal for simple deployments or when MySQL horizontal scaling, sharding requirements, or large-scale deployments.3536### Key Use Cases3738- MySQL Horizontal Scaling39- Database Sharding40- High Availability MySQL41- Multi-Region Deployments42- Cloud-Native MySQL4344---4546## Architecture Design Patterns4748### Core Components4950- **VTGate**: Query routing layer51- **VTTablet**: MySQL wrapper52- **VTController**: Cluster management53- **Keyspace**: Logical database54- **Shard**: Data partition5556### Component Interactions57581. **Client → VTGate**: Client queries VTGate591. **VTGate → VTTablet**: VTGate routes to tablets601. **VTTablet → MySQL**: VTTablet manages MySQL611. **VTController → VTTablet**: VTController manages tablets6263### Data Flow Patterns64651. **Query Routing**: Query → VTGate → VTTablet → MySQL661. **Shard Placement**: Keyspace → Shard → VTTablet → MySQL671. **Replication**: MySQL master → MySQL replicas681. **Failsafe**: VTTablet detects failure → Promote replica6970### Design Principles7172- **MySQL Compatible**: Full MySQL protocol73- **Horizontal Scaling**: Shard and scale74- **High Availability**: Automatic failover75- **Operational Simplicity**: Easy to operate7677---7879## Integration Approaches8081### Integration with Other CNCF Projects8283- **MySQL**: Primary database84- **Kubernetes**: Deployment platform85- **Vitess Operator**: Kubernetes operator86- **Prometheus**: Metrics collection8788### API Patterns8990- **MySQL Protocol**: MySQL client protocol91- **VTGate Protocol**: VTGate internal protocol92- **VTTablet API**: Tablet management API93- **Keyspace API**: Keyspace management API9495### Configuration Patterns9697- **VTGate Config**: VTGate configuration98- **VTTablet Config**: Tablet configuration99- **Keyspace Config**: Keyspace configuration100- **Shard Config**: Shard settings101102### Extension Mechanisms103104- **Custom Sharding**: Custom sharding logic105- **Custom Replication**: Custom replication logic106- **Custom VTGate Plugins**: Custom query routing107108---109110## Common Pitfalls and How to Avoid Them111112### Misconfigurations113114- **Shard Split**: Shard split failures115 - **How to Avoid**: Monitor shard splits, use proper tools116- **VTGate Memory**: VTGate high memory usage117 - **How to Avoid**: Configure memory limits, optimize queries118119### Performance Issues120121- **Schema Changes**: Schema change issues122 - **How to Avoid**: Use Vitess schema management, test changes123- **VTTablet Issues**: Tablet health issues124 - **How to Avoid**: Monitor tablet health, check MySQL status125126### Operational Challenges127128- **Performance Issues**: Query performance129 - **How to Avoid**: Optimize queries, add indexes, monitor slow queries130- **Failover Issues**: Failover problems131 - **How to Avoid**: Test failover, verify replica health132133### Security Pitfalls134135136---137138## Coding Practices139140### Idiomatic Configuration141142- **Shard Key Design**: Design efficient shard keys143- **Schema Management**: Use Vitess schema management144- **Connection Management**: Manage connections efficiently145146### API Usage Patterns147148- **vtctl**: Vitess control utility149- **mysql client**: MySQL protocol client150- **VTGate API**: VTGate API151- **Vitess Operator**: Kubernetes operator152153### Observability Best Practices154155- **Vitess Metrics**: Monitor Vitess performance156- **MySQL Metrics**: MySQL performance metrics157- **Replication Metrics**: Track replication health158159### Testing Strategies160161- **Integration Tests**: Test Vitess functionality162- **Failover Tests**: Test failover scenarios163- **Performance Tests**: Validate performance164165### Development Workflow166167- **Local Development**: Use vitess local cluster168- **Debug Commands**: Check VTGate and tablet logs169- **Test Environment**: Set up test cluster170- **CI/CD Integration**: Automate testing171- **Monitoring Setup**: Configure observability172- **Documentation**: Maintain documentation173174---175176## Fundamentals177178### Essential Concepts179180- **Keyspace**: Logical database181- **Shard**: Data partition182- **VTGate**: Query router183- **VTTablet**: MySQL wrapper184- **Replication**: MySQL replication185- **Failsafe**: Automatic failover186- **Topology Service**: Cluster state storage187- **VSchema**: Sharding schema188189### Terminology Glossary190191- **Keyspace**: Logical database192- **Shard**: Data partition193- **VTGate**: Query router194- **VTTablet**: Tablet195- **Failsafe**: Failover mechanism196197### Data Models and Types198199- **Keyspace**: Keyspace configuration200- **Shard**: Shard configuration201- **VSchema**: Sharding schema202- **Tablet**: Tablet state203204### Lifecycle Management205206- **Query Flow**: Client queries → VTGate → VTTablet → MySQL207- **Shard Split**: Split initiated → New shards → Data copied → Cutover208- **Failover**: Failure detected → Replica promoted → Traffic routed209- **Upgrade**: Rolling upgrade → New version210211### State Management212213- **Keyspace State**: Available, splitting, or merging214- **Shard State**: Primary, replica, or spares215- **VTTablet State**: Master, replica, or spare216- **VTGate State**: Healthy or degraded217218---219220## Scaling and Deployment Patterns221222### Horizontal Scaling223224- **Shard Scaling**: Add shards for more capacity225- **VTGate Scaling**: Scale VTGate instances226- **Replica Scaling**: Add replicas for read scale227- **MySQL Scaling**: Scale MySQL instances228229### High Availability230231- **Shard HA**: Multiple replicas per shard232- **VTTablet HA**: Tablet failover233- **VTGate HA**: VTGate cluster234- **MySQL HA**: MySQL replication235236### Production Deployments237238- **Cluster Setup**: Deploy Vitess cluster239- **Network Configuration**: Configure network240- **Security Setup**: Enable authentication241- **Monitoring Setup**: Configure metrics242- **Logging Setup**: Centralize logs243- **Backup Strategy**: Configure backups244- **Resource Quotas**: Set resource limits245- **Performance Tuning**: Optimize settings246247### Upgrade Strategies248249- **Vitess Upgrade**: Upgrade Vitess components250- **MySQL Upgrade**: Upgrade MySQL version251- **Rolling Upgrade**: Rolling component upgrade252- **Testing**: Verify functionality253254### Resource Management255256- **CPU Resources**: CPU limits257- **Memory Resources**: Memory limits258- **Storage Resources**: MySQL storage259- **Network Resources**: Network configuration260261---262263## Additional Resources264265- **Official Documentation:** https://vitess.io/docs/266- **GitHub Repository:** Check the project's official documentation for repository link267- **CNCF Project Page:** [cncf.io/projects/cncf-vitess/](https://www.cncf.io/projects/cncf-vitess/)268- **Community:** Check the official documentation for community channels269- **Versioning:** Refer to project's release notes for version-specific features270271---272273## Troubleshooting274275### Common Issues2762771. **Deployment Failures**278 - Check pod logs for errors279 - Verify configuration values280 - Ensure network connectivity2812822. **Performance Issues**283 - Monitor resource usage284 - Adjust resource limits285 - Check for bottlenecks2862873. **Configuration Errors**288 - Validate YAML syntax289 - Check required fields290 - Verify environment-specific settings2912924. **Integration Problems**293 - Verify API compatibility294 - Check dependency versions295 - Review integration documentation296297### Getting Help298299- Check official documentation300- Search GitHub issues301- Join community channels302- Review logs and metrics303*Content generated automatically. Verify against official documentation before production use.*304305## Examples306307### Vitess Keyspace Configuration308309310```yaml311# Vitess keyspace configuration for a sharded database312{313 "keyspace": {314 "name": "commerce",315 "sharding_column_name": "user_id",316 "sharding_column_type": "INT64",317 "served_froms": [318 {319 "cell": "zone1",320 "type": "BACKUP"321 }322 ]323 },324 "vindexes": {325 "hash": {326 "type": "hash"327 },328 "numeric": {329 "type": "numeric"330 }331 },332 "tables": {333 "users": {334 "column_vindexes": [335 {336 "column": "user_id",337 "name": "hash"338 }339 ]340 },341 "orders": {342 "column_vindexes": [343 {344 "column": "order_id",345 "name": "numeric"346 }347 ]348 }349 }350}351```352353### Vitens VTGate Configuration354355356```yaml357# VTGate configuration for connection routing358vtgate:359 port: 15001360 grpc-port: 15000361 auth-module: none362 cell: zone1363 root-zone: zone1364 enable-gtids: true365 enable-partial-route: true366 enable-planning-trace: true367 tablet-layout-timeout: 1m368 tablet-layout-refresh: 10s369 query-cache-size: 10000370 query-log-sampling-rate: 1371 stream-pool-size: 100372 enable-separate-cache: true373 enable-native-sharding: true374 enable-pkid-sharding: true375```376377### Vitess VSchema Example378379380```yaml381{382 "commerce": {383 "sharded": true,384 "vindexes": {385 "hash": {386 "type": "hash"387 }388 },389 "tables": {390 "users": {391 "column_vindexes": [392 {393 "column": "user_id",394 "name": "hash"395 }396 ],397 "auto_increment": {398 "column": "user_id",399 "type": "VTAUTO"400 }401 },402 "products": {403 "column_vindexes": [404 {405 "column": "product_id",406 "name": "hash"407 }408 ]409 },410 "orders": {411 "column_vindexes": [412 {413 "column": "order_id",414 "name": "hash"415 }416 ],417 "column_vindexes": [418 {419 "column": "user_id",420 "name": "hash"421 }422 ]423 }424 }425 }426}427```428429---430431## When to Use432433Use this skill when:434435- **Integrating a CNCF project into Kubernetes infrastructure** — You need to configure, deploy, or troubleshoot a cloud-native tool within a cluster436- **Designing cloud-native architecture** — You are selecting and integrating CNCF tools to solve specific infrastructure challenges437- **Resolving operational issues** — A CNCF component is misbehaving, underperforming, or needs configuration changes438---439440## Core Workflow4414421. **Assess Requirements** — Understand the use case, scale, integration needs, and existing infrastructure. **Checkpoint:** Document requirements, constraints, and success criteria.4434442. **Design Architecture** — Plan component interactions, data flow, and deployment strategy using cloud-native best practices. **Checkpoint:** Verify the architecture addresses all requirements and follows CNCF conventions.4454463. **Implement & Configure** — Create manifests, configurations, and deployment scripts. Include resource limits, health checks, and observability hooks. **Checkpoint:** Validate all YAML against schema and test in a staging environment.4474484. **Deploy & Monitor** — Apply manifests to the cluster, verify component health, and confirm observability is working. **Checkpoint:** Confirm all pods/services are running, probes passing, and metrics/alerts configured.449450---451452## Constraints453454### MUST DO455- Include at least one complete working YAML manifest example456- Note when content is auto-generated vs. manually verified457- Reference relevant CNCF project documentation458459### MUST NOT DO460- Deploy manifests without testing in a staging environment first461- Use deprecated API versions (e.g., apps/v1beta1)462- Omit resource limits and requests in Kubernetes manifests