탕구리's 블로그

고민~ 고민! 로그 저장 관리 프로세스 본문

일상생활

고민~ 고민! 로그 저장 관리 프로세스

탕구리당 2020. 11. 1. 22:55
반응형

게임서버들이 남기고 전송하는 로그들의 종류

  • 게임서버 에러 로그
    • 현재 : 서버 로컬에 파일로 남겨서 ELK로 전송 or S3를 통해 공유

  • 플랫폼으로 전송하는 각종 로그
    • 현재 : 게임서버에서 https 프로토콜로 플랫폼에 전송

  • 게임로그 디비로 전송하는 게임 로그
    • 현재 : 게임서버에서 로그디비로 인서트

 

고민

  • 유저들에게 직접적으로 영향이 없는 게임데이터를 제외한 로그 전송 파이프라인을 하나로 통합 할 수는 없을까?
  • 일반 로그를 https로 플랫폼에 전송 할 때 게임서버에 걸리는 부하를 줄이고 싶음.
  • 게임서버 입장에서는 플랫폼 로그와 게임로그를 2중으로 남겨야 하는 부담감이 있음
  • 게임서버에 남기는 모든 로그들의 형식을 공통화 하여 모든 게임들에서 일관된 로그 컬렉팅을 할 수 있게.

 

1. fluentd

  1.  fluentd → fluentd → elastic search → kibana
    1. 게임서버 에러 로그
    2. https://github.com/uken/fluent-plugin-elasticsearch
  2.  fluentd → fluentd → http
    1. 플랫폼 로그
    2. https://docs.fluentd.org/output/http
  3.  fluentd → fluentd → fluentd  mysql plugin
    1. 게임 디비에 저장되는 로그
    2. https://github.com/tagomoris/fluent-plugin-mysql


2.  logstash

  1. filebeat→logstash→ elastic search → kibana
    1. 게임서버 에러 로그
  2. filebeat→logstash→ http
    1. 플랫폼 로그
    2. https://www.elastic.co/guide/en/logstash/current/plugins-outputs-http.html
  3. filebeat→logstash→ mysql
    1. 게임 디비에 저장 되는 로그
    2. https://github.com/theangryangel/logstash-output-jdbc/tree/master
반응형
Comments