execserver on another linux

How to spread one fylr over two linux servers

This is a variation of the main installation method described here. So we will concentrate on the differences.

Goal

  1. One server with only the "execserver" part of fylr, which will be doing the heavy lifting of processing assets, for example generating preview thumbnails. So it should have some CPU cores. We call this one exec.example.com, here.

  2. Another server with all the remaining parts of fylr, doing Webfrontend, SQL, Indexing, etc.. We call this one main.example.com, here.

On the system with the execserver

(We call this system exec.example.com)

  • ensure that only main.example.com is allowed to reach port 8083 on exec.example.com (firewall, or private IP address, etc.)

  • use a fylr.yml like this: (which disables all parts except execserver)

fylr+:
  logger+:
    timeFormat: "2006-01-02 15:04:05Z07"

  db:

  plugin:

  elastic:

  execserver: # no need to configure the client here, as this flyr is the execserver

  services+:
    execserver+: # this is the execserver
      # all: delete failed jobs, for preserving disk space. done: keep failed jobs, for debugging
      jobRemovalPolicy: done
      addr: :8083

    api:

    backend:

    webapp:
  • use such a docker-compose.yml : (no postgreSQL, no Indexer)

services:
  fylr:
    image: docker.fylr.io/fylr/fylr:latest
    hostname: fylr.localhost
    container_name: fylr
    restart: always
    ports:
      - "8083:8083" # access for main fylr
    networks:
      - fylr
    volumes:
      - "/srv/fylr/config/fylr:/fylr/config"
    logging:
      driver: "journald"

networks:
  fylr:
  • About backups: You will have no permanent data on this system, like: no assets, no database. Just a bit of configuration.

On the system without the execserver

(We call this system main.example.com)

  • ensure that only exec.example.com is allowed to reach port 8080 and 8081 on main.example.com (firewall, or private IP address, etc.)

  • use a fylr.yml with these changes, the rest remains as in the default installation:

[...]
  execserver: # the following tells fylr how to connect to the execserver
    addresses:
      - http://exec.example.com:8083/?pretty=true
    parallel: 18
    parallelHigh: 10
    pluginJobTimeoutSec: 2400
    connectTimeoutSec: 120
    # the following tells the execserver how to connect back to the main fylr
    callbackBackendInternalURL: "http://main.example.com:8081"
    callbackApiInternalURL: "http://main.example.com:8080"

  services+:
    execserver: # this empty yaml branch with no leaves disables the execserver

[...]
  fylr:
[...]
    ports:
      - "8080:8080" # fylr api
      - "8081:8081" # fylr backend
[...]

Last updated