Is the API OSS?
Closed this issue · 2 comments
I was looking at the actual HTTP API for coronavirus and as someone who has a keen interest in HTTP/REST I was wondering if the implementation is OSS? I couldn't see anything in the PHE Github org but maybe I missed it. Thanks
Hi @jchannon
I haven't push the the API code to a public repository yet, but I will just as soon as I finish documenting it... so yeah, it will be OSS, but maybe not under MIT. It's something like Apache or BSD-3 would be a better option.
The code is written in Python mostly from the scratch. It is a purpose specific service that is designed to be very light and very fast because it runs as a micro-service on Azure Functions. The API is managed via Azure APIM policies, with a Redis Cache as primary and a disk cache as secondary (backup). It uses CosmosDB as database (SQL flavour).
As of yesterday, the service is handling in excess of 26.5 million requests a day, which is quite considerable by any standard, but is certainly the most hit GOVUK service.
This is the architecture:
Disk Cache (support) ---------+
|
CosmosDB ----- Python micro-service ------------------------- APIM ------------ HTTP GET [v1/data] {PUBLIC}
|
Redis Cache ---------+
CosmosDB ----- Python micro-service ------------------------- APIM ------------ HTTP HEAD [v1/data] {PUBLIC}
APIM ------------ HTTP OPTIONS [v1/data] {PUBLIC}
Disk Cache (support) ---------+
|
Storage ---------------- CDN -------------------------------- APIM ------------ HTTP GET [v1/timestamp] {PUBLIC}
|
Redis Cache ---------+
Disk Cache (support) ---------+
|
CosmosDB ----- Python micro-service ------------------------- APIM ------------ HTTP GET [v1/lookup] {WEBSITE ONLY}
|
Redis Cache ---------+
Brill, thanks!