Skip to main content

Upgrade

WuKongIM supports smooth upgrades on Linux systems, ensuring service continuity and data security.

Description

WuKongIM’s version numbering follows the major.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:
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:
  1. Prepare Green Environment: Set up new servers with the new version
  2. Data Sync: Ensure data is synchronized between blue and green environments
  3. Switch Traffic: Update load balancer to point to green environment
  4. Verify: Confirm everything works correctly
  5. 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:
Configuration compatibility issues:
Data migration issues:

Recovery Steps

  1. Stop services: ./wukongim stop
  2. Restore backup: Restore from backup created before upgrade
  3. Revert executable: Use previous version executable
  4. Restart: ./wukongim --config wk.yaml -d
  5. Verify: Confirm system is working correctly

Automation Scripts

Automated Upgrade Script

Make script executable and use:

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

Monitoring

Next Steps

Monitoring Setup

Set up monitoring for upgraded system

Performance Tuning

Optimize performance after upgrade

Cluster Scaling

Learn about cluster scaling

Best Practices

Backup strategies and best practices