.. _architecture: ************************************* Architecture ************************************* Be sure to take a minute to learn the FindFace Enterprise Server architecture. This knowledge is essential for the FindFace Enterprise Server deployment, integration, maintenance, and troubleshooting. .. rubric:: In this chapter: .. contents:: :local: Architectural Elements ============================== FindFace Enterprise Server consists of the following architectural elements: * FindFace core, * (optional) application modules. .. note:: Application modules are not available in the basic configuration. To learn more about building a turnkey application with the help of our team, contact our experts by info@ntechlab.com. The FindFace core includes the following components: |architecture_en| .. |architecture_en| image:: /_static/architecture.png .. |architecture_ru| image:: /_static/architecture_ru.png +------------------------------+--------------------------------------------------------------------------------------+--------------------------------------------+ | Component | Description | Vendor | +==============================+======================================================================================+============================================+ | findface-extraction-api | Service that uses neural networks to detect a face in an image and extract a | Ntech Lab own deployment | | | face biometric sample (feature vector), gender, age, emotions, and other face | | | | attributes. CPU- or GPU-acceleration. | | +------------------------------+--------------------------------------------------------------------------------------+ | | findface-sf-api | Service that implements HTTP API for face detection and | | | | face recognition. | | +------------------------------+--------------------------------------------------------------------------------------+ | | findface-tarantool-server | Service that provides interaction between the ``findface-sf-api`` service and the | | | | biometric database (the Tarantool-powered database that stores face | | | | biometric samples). | | +------------------------------+--------------------------------------------------------------------------------------+ | | findface-upload | NGINX-based web server used as a storage for original images, thumbnails, and | | | | normalized face images. | | +------------------------------+--------------------------------------------------------------------------------------+ | | findface-facerouter | Service used to define processing directives for detected faces. | | +------------------------------+--------------------------------------------------------------------------------------+ | | findface-video-manager | Part of the video face detection module. Service that is used for managing the | | | | video face detection functionality, configuring the video face detector | | | | settings, and specifying the list of to-be-processed video streams. | | +------------------------------+--------------------------------------------------------------------------------------+ | | findface-video-worker | Part of the video face detection module. Service that recognizes a face in the video | | | | and posts its normalized image, full frame, and such metadata as the camera ID and | | | | detection time to the ``findface-facerouter`` service for further processing | | | | according to given directives. CPU- or GPU-acceleration. | | +------------------------------+--------------------------------------------------------------------------------------+ | | findface-ntls | License server which interfaces with the NtechLab Global License Server or a USB | | | | dongle to verify the :ref:`license ` of your FindFace | | | | Enterprise Server instance. | | +------------------------------+--------------------------------------------------------------------------------------+--------------------------------------------+ | Tarantool | Third-party software which implements the biometric database that stores extracted | `Tarantool `_ | | | biometric samples (feature vectors). | | +------------------------------+--------------------------------------------------------------------------------------+--------------------------------------------+ | etcd | Third-party software that implements a distributed key-value store for | `etcd `_ | | | ``findface-video-manager``. Used as a coordination service in the distributed | | | | system, providing the video face detector with fault tolerance. | | +------------------------------+--------------------------------------------------------------------------------------+--------------------------------------------+ | NGINX | Third-party software which implements the ``findface-upload`` component. | `nginx `_ | +------------------------------+--------------------------------------------------------------------------------------+--------------------------------------------+ | memcached | Third-party software which implements a distributed memory caching system. | `memcached `_ | | | Used by ``findface-extraction-api`` as temporary storage for extracted face | | | | biometric samples before they are written to the biometric database powered by | | | | Tarantool. | | +------------------------------+--------------------------------------------------------------------------------------+--------------------------------------------+ .. seealso:: :ref:`components` Single- and Multi-Host Deployment ================================== Depending on your system characteristics and performance requirements, you can opt to install FindFace Enterprise Server standalone or in a cluster environment: +----------------+-----------------------------------------------------------------------------------------------------------------------------+ | Deployment | Recommendation | +================+=============================================================================================================================+ | Standalone | You can deploy FindFace Enterprise Server and neural network models on a single host (standalone) | | | if the number of faces in the database does not exceed 1,000,000 (recommended limit). This variant makes it easier to | | | start deployment and cater to the basic requirements of your system. | +----------------+-----------------------------------------------------------------------------------------------------------------------------+ | Cluster | If the number of faces in the database does exceed 1,000,000, we recommend you to deploy FindFace Enterprise Server | | | in a cluster environment. In this case, FindFace Enterprise Server | | | components will be distributed across several hosts. This is a medium and large deployment that can be scaled almost | | | infinitely. It will also suit professional high load projects with severe requirements for performance. | +----------------+-----------------------------------------------------------------------------------------------------------------------------+ If you opt for the cluster deployment, we offer you one of the following deployment schemes: * Deploy FindFace Enterprise Server standalone and distribute additional ``findface-video-worker`` components across multiple hosts. * Distribute the FindFace Enterprise Server components across multiple hosts. If necessary, set up load balancing. CPU- and GPU-acceleration ========================================== The ``findface-extraction-api`` and ``findface-video-worker`` services can be either CPU- or GPU-based. During installation from the developer-friendly :ref:`installer `, you will have an opportunity to choose the acceleration type you need. If you opt to install FindFace Enterprise Server from the :ref:`repository package `, deploy the ``findface-extraction-api`` and ``findface-video-worker-cpu`` packages on a CPU-based server, and the ``findface-extraction-api-gpu`` and/or ``findface-video-worker-gpu`` packages on a GPU-based server. .. important:: Refer to :ref:`requirements` when choosing hardware configuration. .. important:: If the resolution of a camera(s) in use is more than 1280x720px, it is strongly recommended to use the GPU-accelerated package ``findface-video-worker-gpu``.