Challenges
- keeping the API fast while thousands of media players constantly sync content and report their status;
- limiting the number of AWS Fargate tasks that autoscaling kept adding because the application booted from scratch on every request;
- handling tens of millions of log entries per day from devices in more than 10,000 locations;
- searching the logs of a single media player, which took ten seconds or more in Grafana Loki;
- migrating the logging system without any risk of losing data that cannot be recreated.
Solution
The TCAdvert API is a Laravel application running on Amazon ECS with AWS Fargate on ARM64 AWS Graviton processors, behind an Application Load Balancer. HTTP traffic, background jobs, file processing and WebSockets run as separate services, and ECS scales them automatically based on CPU usage and request count. Every gain in the efficiency of a single task translates directly into fewer running tasks and lower cost.
In September 2025, Fingoweb moved the API from Apache and PHP-FPM to FrankenPHP with Laravel Octane. In worker mode, the application boots once and serves subsequent requests without reloading the framework, while database connections stay open across requests. The CPU no longer spends its time on repeated bootstrapping, so autoscaling adds new tasks far less often.
We also moved the device logging system from Grafana Loki to VictoriaLogs. Logs flow through an OpenTelemetry and Vector pipeline, so changing the storage backend required a configuration change rather than an application change. During the transition, the same logs were written to both systems in parallel, which let us compare them 1:1 on real traffic before switching Loki off.
As part of the project, Fingoweb delivered:
- the move of the API from Apache and PHP-FPM to FrankenPHP with Laravel Octane in worker mode;
- adapting the application to long-running processes, including periodic worker restarts;
- an OpenTelemetry and Vector log pipeline with disk buffering;
- parallel log writes to Grafana Loki and VictoriaLogs during the transition (dual-sink);
- device logs displayed directly in the CMS, where the support team uses them.
Results
Thanks to the AWS infrastructure optimization, TCAdvert serves around 15,000 media players with fewer servers and faster response times, and the savings were reinvested in improvements that made the CMS faster. The support team can once again diagnose devices in real time. Result are:
- 57% fewer Fargate tasks serving the API at the same traffic, with a proportionally lower cost for this part of the infrastructure;
- device API response time (p95) reduced from about 350 ms to about 90 ms;
- log search results in about 0.5 seconds instead of ten seconds or more, without adding resources;
- logging system migrated with no data loss and no impact on platform availability.
We offer more
See what else we can do for you - from product design to software continuous delivery
-
LG webOS TV App Development
See how Fingoweb delivered custom LG webOS TV app development for IMS Sensory Media - a webOS player app serving 2,700+ digital signage screens across webOS 4.0–9.0.
-
IMS Sensory Media
IMS Sensory Media is a market leader in sensory marketing. It provides advertising systems, technologies and tools for effective, business-efficient mood creation and positive atmosphere building at the point of sale.
-
Wayfinder
An electronic panel with an interactive touch map located in many shopping malls in Poland.