Skip to content

Upgrade Guide

This page provides the instructions for the upgrade of the Document Reader SDK Web Service together with the connected Database.

All Databases

Pre-Deployment Steps

1. Backup Database

As a precaution, perform the full database backup.

2. Ensure database readiness

Verify the database is healthy and has sufficient capacity to handle connections. Check replication lag (if applicable) and resolve any detected issues.

Relational Databases

The following instructions are relevant for the relational databases (RDBMS), like MySQL, MariaDB, Postgres, SQL Server, Oracle DB, and others.

Scale Down to Zero

Due to the nature of RDBMS, which requires SQL schema changes to be applied first, the proposed approach is to scale the service to zero to avoid overloading the database with mass migrations. See the steps below.

1. Stop traffic routing

Update the load balancer (or service discovery mechanism) to stop routing requests to the service.

2. Graceful shut down

  • Gracefully shutdown running instances, ensuring all ongoing processes are complete.
  • Ensure no new queries are sent to the database.

3. Scale down

Set the service to 0 instances.

Deploy New Version

  1. Perform the release steps (for example, rolling out the updated containers, installing packages, etc.).
  2. Verify that the new version is up and running as expected.

Scale Up

1. Start with single instance

  • Scale up to 1 instance.
  • Verify that the instance successfully connects to the database.
    • Check health probes and logs for errors related to database connections or queries.
    • Confirm the instance is responding to test or monitoring requests.

2. Increase instance number to the target load

3. Monitor stability and performance

Monitor the deployed instance for:

  • Database connection health (locks, connection count).
  • CPU, memory, and other resource metrics.
  • Application-level metrics (latency, error rates).

Rollback Plan

If you need to return the Web Service to the previous state, perform the following steps.

  1. Stop the service.
  2. Restore the database from the backup.
  3. Deploy the previous version of the service.