Custom Connection Profile for iSeries Improves MuleSoft Integration Performance
A client in the healthcare field was experiencing serious degradation in performance with database queries. The version of their integration platform, MuleSoft 3.9, did not offer out-of-the-box support for their legacy iSeries system and DB2 database. Although MuleSoft’sAnypoint Platform provides a Generic database connector that could be used with DB2, it was found to create a new database connection for each query. This created heavy loads and slowed performance for the system’s resources.
The solution needed to remove ad hoc connections to the database to lessen system load. To achieve this, a third-party library called HikariCP was used to create a custom connection profile. The new connection profile caches database connections from the connection pool per application instead of creating a new connection for each query. These connections to the database can then be re-used. Profiles can specify the number of connections to be pre-cached and indicate a time-to-live value, reducing the number of unused connections occupying the pool.
With the new custom connection profile, connections are always available when a new request is added. As a result, resource utilization became more predictable and the client saw an impressive drop of nearly 70% in response times, all but eliminating the performance issues caused by DB2 queries.