Architecture
How fylr's components — the services, the datastores and the media tools — work together.
fylr is a single Go program that runs several services, backed by two datastores and a set of media-processing tools. It runs on Linux, Windows and macOS, and under Linux is usually deployed in containers via Docker or Kubernetes.
Components
Services (configured under fylr.services in fylr.yml):
api / webapp — the public HTTP surface: the JSON API under
/api/v1and the web frontend. Clients authenticate here (OAuth2) and send their requests.backend — does the actual work: reads and writes objects in PostgreSQL, keeps the OpenSearch index in sync, and runs the file workers. It also serves the unauthenticated
/inspectsurface, so it must stay on a private network.execserver — runs the external media tools out-of-process, on demand. Every fylr server keeps a websocket to each execserver, the slot broker, and the execserver hands its free slots to the waiting jobs by priority (see Exec server). It can run standalone and be scaled to several instances, also behind one load-balanced address; an execserver and the fylr servers that use it are upgraded together.
Datastores:
PostgreSQL — the system of record for every object, the datamodel, users, rights and configuration.
OpenSearch (or Elasticsearch) — the search and aggregation index, kept in sync from PostgreSQL.
Storage — original files and their produced renditions, in a local
filedirectory, S3 or Azure.
Media tools — libvips, ImageMagick, FFmpeg, LibreOffice, ExifTool, tesseract, mutool and more, invoked by the execserver to produce previews and extract metadata. The full list is on Install from source.
Deployment
A single instance runs every service together. For horizontal scaling the execserver can run separately, and several fylr instances can share one PostgreSQL and one OpenSearch — load-balanced in front, equally privileged.
See also
Install from source — the build and the third-party tools.
Exec server — how fylr runs the media tools.
The File Worker — the file-production pipeline.
The /inspect backend — the introspection surface on the backend.
Last updated