Skip to main content

🚀 Production Deployment Guide

Deploy your Dubhe applications to production with confidence using battle-tested strategies

Prerequisites: Completed application development and local testing

🎯 Deployment Overview

Deploying a Dubhe application involves multiple components working together to provide a seamless user experience.

Smart Contracts

Move contracts deployed to blockchain networks

Indexer Service

Real-time blockchain event processing

Frontend Application

User interface with WebSocket connections

📋 Pre-Deployment Checklist

1

Code Audit & Security Review

Smart Contract Audit

  • Review all Move contracts for vulnerabilities
  • Run formal verification tools
  • Check access control mechanisms
  • Validate input sanitization

Frontend Security

  • Audit client-side code
  • Verify API endpoints
  • Check authentication flows
  • Review environment variable usage
2

Performance Testing

3

Integration Testing

⛓️ Blockchain Deployment

Network Configuration

Contract Deployment Process

1

Pre-deployment Verification

2

Staged Deployment

3

Post-deployment Validation

Multi-Chain Deployment Strategy

🗃️ Indexer Service Deployment

Infrastructure Requirements

Database

PostgreSQL 14+ with optimized configuration for high-throughput writes

Message Queue

Redis for real-time event processing and WebSocket management

Container Runtime

Docker with orchestration via Kubernetes or Docker Compose

Load Balancer

NGINX or cloud load balancer for distributing client connections

Docker Configuration

Kubernetes Deployment

🖥️ Frontend Deployment

Static Site Deployment

📊 Monitoring & Observability

Application Monitoring

Error Tracking & Logging

🚦 CI/CD Pipeline

GitHub Actions Workflow

🛡️ Security Considerations

Environment Security

Secret Management

  • Use environment-specific secrets
  • Rotate keys regularly
  • Never commit secrets to code
  • Use vault systems in production

Network Security

  • Enable HTTPS/WSS everywhere
  • Configure proper CORS policies
  • Use rate limiting
  • Implement DDoS protection

📈 Performance Optimization

Database Optimization

Caching Strategy

🔄 Rollback & Recovery

Deployment Rollback Strategy

1

Database Migrations

2

Smart Contract Upgrades

3

Service Rollback

📋 Post-Deployment Checklist

1

Immediate Verification

  • All services are running and healthy
  • Database connections are stable
  • WebSocket connections are working
  • Frontend can connect to backend
  • Basic game functions work correctly
2

Performance Monitoring

  • Response times are within acceptable limits
  • Database query performance is optimal
  • Memory usage is stable
  • No error rate spikes
  • WebSocket connection count is normal
3

Business Logic Validation

  • User registration works
  • Game state updates correctly
  • Transactions are processed
  • Events are emitted and captured
  • Cross-chain functionality (if applicable)
4

Security Verification

  • HTTPS is enforced
  • CORS policies are correct
  • Rate limiting is active
  • No sensitive data in logs
  • Authentication flows work

🚀 Scaling Considerations

Horizontal Scaling Strategies

Indexer Scaling

  • Multiple indexer instances with load balancing
  • Event partitioning by entity ID ranges
  • Read replicas for database queries
  • Redis cluster for session management

Frontend Scaling

  • CDN for static assets
  • Edge deployment for global users
  • Client-side caching strategies
  • Progressive loading techniques

📚 Further Resources

Performance Guide

Advanced optimization techniques for production

Testing Guide

Comprehensive testing strategies

Monitoring Best Practices

Setting up effective monitoring and alerts

Community Support

Get help from the Dubhe community