본문 바로가기

Dev3

flask WSGI Server (Gunicorn, uWSGI, mod_wsgi 또는 내장 werkzeug 벡자이크) 출처: etloveguitar.tistory/92 import random import threading import time from werkzeug.local import LocalStack thread_data_stack = LocalStack() def long_running_function(thread_index): thread_data_stack.push(f'index: {thread_index}, thread_id: {threading.get_native_id()}') print(f'Starting thread #{thread_index}... {thread_data_stack}') t.. 2024. 4. 12.
파이썬 flask - redis - celery 구조 파이썬 Flask webframework redis broker celery async worker 구조로 사용할 것이다. title excel upload api participant User participant Web App (Flask) participant Redis participant Celery Worker participant DB User->Web App (Flask):GET /excel UserWeb App (Flask):POST /excel/upload Web App (Flask)->Redis:Enqueue a new task to the broker RedisDB:Update result User->Web App (Flask):Check the status of the task U.. 2024. 3. 14.
APM, JAVA Agent 출처: https://saramin.github.io/2020-03-24-elastic-apm-1/ APM APM은 Application Performance Monitoring의 약어로, Application에 대한 성능정보 및 발생한 Error정보 그리고 Application이 동작중인 서버의 기본적인 Metric정보를 수집 할 수 있는 기능을 지원합니다. 또한 MicroService 환경에서 서비스를 구성하는 여러 Application간의 Request를 하나의 Trace로 묶어서 추적 할 수 있는 분산 Tracing(distributed tracing)에 대한 기능도 지원합니다. APM은 위와 같이 수집된 여러 데이터를 바탕으로 하여 Application에 지연이 발생하였을때 지연에 대한 병목 구.. 2024. 3. 6.