You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simple Flask application, very basic UI that implements some mathematical functions, the purpose is to showcase essential features of a web application from logging to monitoring and how to containerize a web application with dependent services using docker-compose.
Design
Frameworks -
Flask - Lightweight, easy to setup and gives a development level server.
Prometheus - Helpful as it scrapes/ pulls the metrics, has a basic dashboard as
well.
For the purpose of this exercise, I have created a simple application service which
accepts requests and appropriately handles them. It constantly generates metrics, and
these are scraped by prometheus service.
The layout is a basic home page. Have used HTML forms to accept input and routing
that to the flask server which computes the function for the corresponding API endpoint.
Written minimal test for the compute functions.
Added validation to form data, inputs specific to the functions.
Logging the request/ response, using log rotation with a backup count of 1.
For handy monitoring, have created an NFR Script that can generate requests, call the
APIs.
Using Docker to create a container based application, for easy debugging and handy
deployment/ setup on any m/c.