Payment processing improvement from seven hours to minutes…

Read Time
5 minute read

This is the journey of how we transformed a legacy backend process, for translating customer payment information into a format suitable for our third party, from seven hours (sometimes extending to ten hours) to just a few minutes!

This is largely thanks to the use of modern cloud technologies and strategies such as:

Parallel execution via serverless functions and cloud storage

The previous translation process was designed to execute in a legacy technology set-up and run within an on-premises server instance. This meant that the process was vulnerable to high memory and CPU utilization with no room for automatic scaling up of resources.

Furthermore, due to the high risk of failure, the files were being processed in series i.e., one after another. Hence the total duration of the process was the sum of the duration for each file.

With the new cloud-based infrastructure using serverless functions, all files are now uploaded at once to the cloud, such that each file triggers a new instance of the serverless function as demand requires. Hence the total duration of the new process is no longer the sum of each, but simply the duration of whichever file finishes last.

Retrieving data from NoSQL rather than SQL server

As part of the translation process, the new files required data from various tables within an SQL server database, querying multiple times per file being translated, before applying further logic to extract certain details for each payment within the file.

With the new process, the data is simply streamed out of the SQL server into NoSQL which is designed solely for use by the new translation process.

Moreover, any logic previously required to transform the data is now done as part of the streaming process, hence the data is already available and waiting in NoSQL in the format required for the translation process. Combined with NoSQL's high speed querying capabilities, this provides a very fast processing time.

Other improvements (along with corrections in certain fields on the translated file) include:

Instant logging and notifications

The new translation process now provides full visibility via cloud-based observability tools, which promptly notify the Support and Development Teams regarding any issues with the translation, along with details of the errors. Furthermore, the file upload/download process to and from our cloud storage provides email alerts to appropriate business personnel regarding the status of the process.

The results

Load testing results for severe but plausible scenarios revealed huge improvements in the end-to-end process of uploading the file to the cloud, and downloading to on-prem, while the serverless function itself took mere seconds!

These results illustrate the great strides taken to cater for our growth ambitions, by designing future-proof systems that can handle large volumes as we increase our customer base and diversify our product propositions.

P.S. And our business colleagues can now have an early evening!

By Neba, Engineer III