This API provides information about airports of Bangladesh.
It is written in Go and uses a simple in-memory database to store airport data.
-
We want to update the image of airports quite often.
So they need an endpoint to update an airport’s image. The images should be stored in a cloud storage bucket. -
There is an API gateway configured in front of this service that routes all traffic to the
/airports
endpoint.graph TD A(Client Requests) --> |100% Traffic| B((API Gateway)) B --> |100% Traffic| C("<code>/airports</code> endpoint")
The development team has been asked recently to make some changes to the
/airports
API.
So they created a new version of the API at/airports_v2
without breaking the existing one.The API gateway is configured to route all the traffic to
/airports
endpoint (as shown above).
But the team wants to test the new version of the API by sending only 20% of traffic to the/airports_v2
endpoint.graph TD A(Client Requests) --> |100% Traffic| B((API Gateway)) B --> |80% Traffic| C("<code>/airports</code> endpoint") B --> |20% Traffic| D("<code>/airports_v2</code> endpoint")
- Provision a cloud storage bucket using Infrastructure as Code (IaC).
- Make an endpoint
/update_airport_image
to update an airport’s image. - Containerize the Go application.
- Prepare a deployment and service resource to deploy in Kubernetes.
- Use API gateway Create routing rules to send 20% of traffic to the
/airports_v2
endpoint.
- Set up a simple CI/CD pipeline to build and deploy the app to Kubernetes.
- Add basic monitoring to track response times for each endpoint.
- Try not to spend more than 4 hours for the solution. Focus on your approach rather than completing everything.
- It’s okay if you don’t finish all the tasks in time. We’re more interested in understanding your problem-solving approach.
- Document your thought process and decisions in the
README.md
file. - You can use any IaC (Infrastructure as Code) tool to provision the cloud storage bucket.
- There’s no need to actually provision a cloud storage bucket. Just provide IaC (pseudo)code.
- For the
/update_airport_image
endpoint, you don’t need to actually store the image. You can mock the process, but we expect to see a cloud storage connection. - Use any API gateway you prefer for routing traffic.
- Fork this repository and commit your code.
- Short and frequent commits are often better than one large commit.
- Update the
README.md
file with your instructions, thought process and decisions. Include any diagrams if necessary. - When done, send your repository link to us.
Remember you don't need to finish all the tasks if you run out of time.
We're more interested in your approach and thought process. 😉