Centralizing event logs in a distributed application architecture
No Thumbnail Available
URL
Journal Title
Journal ISSN
Volume Title
Perustieteiden korkeakoulu |
Master's thesis
Authors
Date
2024-08-19
Department
Major/Subject
Security and Cloud Computing
Mcode
SCI3084
Degree programme
Master’s Programme in Computer, Communication and Information Sciences
Language
en
Pages
54
Series
Abstract
Distributed system architectures have raised their popularity as the cloud computing has evolved. Logging is an essential tool for monitoring them. However, implementing it is not without challenges in the distributed system architectures. Often, logs are not in a consistent or unified format and additionally, they are scattered across the system, making them difficult to manage. Setting up a centralized log aggregation and storage for logs can be used to solve these problems. The thesis is structured around a project where we design and implement a distributed logging system that aggregates log records to a centralized storage. We first introduce the concepts of log data, formats, aggregation, and storage. The new logging system is designed on top of a pre-existing software infrastructure, where the log sources are microservices running in Kubernetes and applications running in front-end clients and credit-card-sized computers, BeagleBones. Also, the logs manageable by developers are transformed into a unified format. The implementation prioritizes maintainability, scalability, and cost-effectiveness. The implemented system achieves the set objectives of unifying log formats and aggregating logs in centralized storage, OpenSearch. The unified format was achieved by developing loggers for the two application programming languages used in the system and deploying a central log aggregator, Fluentd. Apache Kafka was also used for collecting logs from front-end clients and BeagleBones. As part of our future work, we plan to expand the monitoring system by implementing distributed tracing.Hajautetut järjestelmäarkkitehtuurit ovat kasvattaneet suosiotaan pilvilaskennan kehittyessä. Lokitus on olennainen väline niiden seurannassa. Sen toteuttaminen hajautetuissa järjestelmäarkkitehtuureissa ei kuitenkaan ole yksinkertaista. Usein lokit eivät ole johdonmukaisessa tai yhtenäisessä muodossa, ja lisäksi ne ovat hajallaan eri puolilla järjestelmää, mikä vaikeuttaa niiden hallintaa. Näiden ongelmien ratkaisemiseksi voidaan käyttää keskitettyä lokien kokoamista ja niiden tallentamista keskitettyyn tietovarastoon. Tämä opinnäytetyö rakentuu projektin ympärille, jossa suunnittelemme ja toteutamme hajautetun lokitusjärjestelmän, joka kokoaa lokit keskitettyyn varastoon. Esittelemme ensiksi lokitiedon, formaattien, aggregoinnin ja tallennuksen käsitteet. Uusi lokitusjärjestelmä suunnitellaan jo olemassa olevan ohjelmistoinfrastruktuurin päälle, jossa lokilähteinä ovat mikropalvelut Kubernetesissa ja sovellukset front-end-asiakkaissa ja luottokortin kokoisissa tietokoneissa, BeagleBoneissa. Kehittäjien hallittavissa olevat lokit muutetaan myös yhtenäiseen muotoon. Toteutuksessa asetetaan etusijalle ylläpidettävyys, skaalautuvuus ja kustannustehokkuus. Toteutetulla järjestelmällä saavutetaan asetetut tavoitteet, jotka koskevat lokien yhtenäistämistä ja kokoamista keskitettyyn tietovarastoon, OpenSearchiin. Yhtenäinen muoto saavutettiin kehittämällä lokikirjoitusohjelmat kahdelle järjestelmässä käytetylle ohjelmointikielelle ja ottamalla käyttöön Fluentd-ohjelmaa käyttävä keskitetty lokien aggregointijärjestelmä. Apache Kafkaa käytettiin myös kerättäessä lokeja front-end-asiakkailta ja BeagleBonesilta. Osana tulevaa työtä aiomme laajentaa seurantajärjestelmää toteuttamalla hajautetun jäljityksen.Description
Supervisor
Aura, TuomasThesis advisor
Kostiainen, EelisKeywords
logging, distributed systems, log storage, log aggregation