A brief introduction to Model deployment - Part 1
Gururajan Govindan
Analytics Professional | Author | Trainer | Data Science | Data Engineering | Career Guidance
Let’s break down the above image that depicts the entire API workflow and understand every component.
Components
1.Client: The client in the architecture can be any device or a third party application that tries to request the server hosting the architecture for model predictions. Example: Facebook trying to tag your face on a newly uploaded image.
2. Load Balancer: A load balancer tries to distribute the workload (requests) across multiple servers or instances in a cluster. The aim of the load balancer is to minimize the response time and maximize the throughput by avoiding the overload on any single resource. In the above image, the load balancer is public-facing entity and distributes all the requests from the clients to multiple Ubuntu servers in the cluster.
3. Nginx: Nginx is an open-source web server but can also be used as a load balancer. Nginx has a reputation for its high performance and small memory footprint. It can thrive under heavy load by spawning worker processes, each of which can handle thousands of connections. In the image, nginx is local to one server or instance to handle all the requests from the public-facing load balancer. An alternative to nginx is Apache HTTP Server.
4. Gunicorn: It is a Python Web Server Gateway Interface (WSGI) HTTP server. It is ported from Ruby’s Unicorn project. It is a pre-fork worker model, which means a master creates multiple forks which are called workers to handle the requests. Since Python is not multithreaded, we try to create multiple gunicorn workers which are individual processes that have their own memory allocations to compensate for the parallelism for handling requests. Gunicorn works for various Python web frameworks and a well-known alternative is uWSGI.
5. Flask: It is a micro web framework written in Python. It helps us to develop an application programming interface (API) or a web application that responds to the request. Other alternatives to Flask are Django, Pyramid, and web2py. An extension of Flask to add support for quickly building REST APIs is provided by Flask-RESTful.
6. Keras: It is an open-source neural network library written in Python. It has the capability to run on top of TensorFlow, CNTK, Theano or MXNet. There are plenty of alternatives to Keras: TensorFlow, Caffe2 (Caffe), CNTK, PyTorch, MXNet, Chainer, and Theano .
7. Cloud Platform: If there is one platform that intertwines all the above-mentioned components, then it is the cloud. It is one of the primary catalysts for the proliferation in the research of Artificial Intelligence, be it Computer Vision, Natural Language Processing, Machine Learning, Machine Translation, Robotics or Medical Imaging. Cloud has made computational resources accessible to a wider audience at a reasonable cost. A few of the well-known cloud web services are Amazon Web Services (AWS), Google Cloud and Microsoft Azure.
To be Continued...
Marketing Advisor at Research Insights
4 年Cloud Application Programming Interface Market: - by Component and Application, Players and Regions-Forecast to 2024 Request for a sample of this research report @ https://bit.ly/31hMueO Cloud Application Programming Interface- Global Market Status & Trend Report 2013-2023 Top 20 Countries Data offers a comprehensive analysis on Cloud Application Programming Interface industry, standing on the readers perspective, delivering detailed market data in Global major 20 countries and penetrating insights. Some of the key players in Cloud Application Programming Interface market include TIBCO Mashrey, International Business Machine, Corporation, Microsoft, Google, Apigee Corporation, Scale Inc., Axway Software SA, CA Technologies. Read more at above given link!