Upgrade
WuKongIM supports smooth upgrades on Linux systems, ensuring service continuity and data security.Description
WuKongIM’s version numbering follows themajor.minor.patch format, for example 1.0.0. When the patch number increases, it indicates bug fixes or minor feature updates; when the minor version increases, it indicates new features; when the major version increases, it indicates incompatible API changes.
Therefore, as long as you don’t upgrade major versions, the upgrade process is smooth.
Version Compatibility:
- Patch updates (e.g., 2.0.1 → 2.0.2): Always safe, includes bug fixes and minor improvements
- Minor updates (e.g., 2.0.x → 2.1.x): Generally safe, includes new features with backward compatibility
- Major updates (e.g., 2.x.x → 3.x.x): May include breaking changes, requires careful planning
Upgrade Steps
Single Node Upgrade
1. Check Current Version
First, check your current WuKongIM version:2. Backup Data (Recommended)
Before upgrading, it’s recommended to backup your data:3. Download New Version
4. Replace Executable File
5. Start Service
6. Verify Upgrade
Multi-Node Cluster Upgrade
For cluster deployments, perform rolling upgrades to maintain service availability:1. Upgrade One Node at a Time
2. Verify Cluster Health
Advanced Upgrade Strategies
Blue-Green Deployment
For critical production environments:- Prepare Green Environment: Set up new servers with the new version
- Data Sync: Ensure data is synchronized between blue and green environments
- Switch Traffic: Update load balancer to point to green environment
- Verify: Confirm everything works correctly
- Cleanup: Remove blue environment after successful verification
Rolling Upgrade with Load Balancer
Rollback Procedures
If issues occur during upgrade, you can rollback:1. Quick Rollback
2. Data Rollback (if needed)
Systemd Service Upgrade
If using systemd service:Upgrade Checklist
Pre-Upgrade
- Check current version and target version compatibility
- Review release notes for breaking changes
- Create data backup
- Plan maintenance window
- Notify users of potential downtime
- Prepare rollback plan
During Upgrade
- Monitor system resources
- Watch application logs
- Verify service health endpoints
- Test critical functionality
- Monitor cluster status (for multi-node)
Post-Upgrade
- Verify version upgrade successful
- Test all major features
- Monitor performance metrics
- Check data integrity
- Update documentation
- Clean up old backups (after verification period)
Troubleshooting
Common Issues
Service fails to start after upgrade:Recovery Steps
- Stop services:
./wukongim stop - Restore backup: Restore from backup created before upgrade
- Revert executable: Use previous version executable
- Restart:
./wukongim --config wk.yaml -d - Verify: Confirm system is working correctly
Automation Scripts
Automated Upgrade Script
Best Practices
Planning
- Test in staging: Always test upgrades in a staging environment first
- Read release notes: Understand what changes are included
- Schedule maintenance: Plan upgrades during low-traffic periods
- Communicate: Inform stakeholders about planned maintenance
Execution
- Monitor closely: Watch logs and metrics during upgrade
- Upgrade gradually: For clusters, upgrade one node at a time
- Verify thoroughly: Test all critical functionality after upgrade
- Keep backups: Maintain backups until upgrade is fully verified

