How Microservices Empowered the UK's DWP to Pivot During COVID-19

In the beginning of 2019, the U.K.’s Department of Work and Pensions (a British government department responsible for welfare and pension policy) began work on an API Library. DWP Integration lead Jaqui Ledgetter credits this library (which can be used across government agencies) with empowering the DWP to respond to the COVID-19 crisis with alacrity.

Ledgetter further explains the genesis of the plan to develop an API library for DWP in an interview with

"APIs are only useful if they can be discovered for re-use. We found that one of the key barriers to re-use in a large organization like DWP was that developers didn’t know what already existed. Creating a self-service API library gives all developers one place to look for re-usable APIs. It enables them not only to discover re-usable information and services, but they can also test them using Mocking services before developing any code for their system. This means that they can create and test their designs before and during building their own code. This helps accelerate development, enabling faster, and more accurate, delivery.  It also allows us to focus our efforts on building new components rather than replicating capabilities and features that already exist."

Ledgetter credits the strength of the library to their microservices. She explains that microservices are “small, discrete services, they are easier to maintain and change; they are also easy to scale up and down using cloud hosting solutions.” Tweaking these small, individual components continuously is simpler and has less risk than the large-scale, comprehensive release-based updates they historically deployed.

Features-focused applications rely on validations built into the code, and are unwieldy and laborious to integrate: this level of complication makes reusing an app unappealing. Even minor changes are prohibitive, as they require a full system testing before they can be deployed. “Deploying change takes longer and any defects can break the whole system which means any change needs a full regression test which can be lengthy and expensive.”

The Microservice-focus in the API library is what allowed the DWP to pivot handily in the face of COVID-19:

"Having the API Library available meant that, as soon as we got requests into our Covid-19 rapid response team, we had a single registry to go to that enabled us to identify, within an hour of the request, if we had an API that could meet the requirement already or not. It also helped us assess if we didn’t have an API that exactly matched, whether we had one that could meet most of the requirement... Once we identified – or built – the API that met the requirement, we deployed it onto our current shared API Gateway which was already hosted in our internet-facing cloud. This meant that all the infrastructure was already in place so, once the API was tested and proven to be suitable, it could be deployed really easily through the existing shared infrastructure. Historically, the process of building the underlying infrastructure could take months; we deployed new APIs, or extended throughput on existing APIs within two days. This would not have been possible without the API Library or the shared API Gateway."

Hosting their API gateway in a cloud environment allowed the team to scale up in near real-time, after completing assessment of forecasted API volumes. This microservices approach will build the pathway towards the future, with the hope that eventually they will be able to “join up services across government and one initiative is that we’re creating a central cross-government API Registry that will enable us to share what APIs we already have available, as well as being able to see what APIs other government departments have available.”

Providing a holistic environment for citizens is the end-game for Ledgetter’s team: common, reusable technical components assisted by a fine layer of individually created rules for each policy product. Rather than creating an overall product, each citizen will have an individual experience based on their unique needs.

Original Article

Inside DWP’s digital coronavirus response – APIs, reuse and micro-services