Skip to content

f-lab-clone/ticketing-infra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

Our primary goal was to build a scalable and efficient backend for a ticketing service that could handle high loads with minimal latency. The project focuses exclusively on the backend and infrastructure aspects, omitting a frontend interface to concentrate on the underlying mechanics and performance. This repository highlights the infrastructure conponents, illustrating our journey through building infrastructure, creating CI/CD pipelines, and managing containers.

Programming Language & Framework: We chose Kotlin and Spring Boot for their expressive syntax and the powerful suite of tools for building web applications efficiently.

Database: We utilized MySQL for its powerful database locking functions, which are essential in managing concurrent operations effectively within our ticketing system. This capability ensures data integrity and consistent performance under high-load scenarios.

Containerization & Orchestration: Kubernetes was used to manage our containerized applications, enabling easy scaling and management across multiple servers hosted on AWS.

Configuration Management: Helm charts helped us streamline the installation and management of our Kubernetes applications.

Continuous Deployment: ArgoCD was employed to automate the deployment process, ensuring our changes were seamlessly and reliably pushed to production.

Infrastructure as Code: Terraform allowed us to define our infrastructure using configuration files, which helped in maintaining consistency and ease of deployment across environments.

Performance Testing: We employed K6 to conduct spike tests, simulating scenarios with excessive simultaneous access to evaluate the performance and robustness of our system under extreme conditions.

Monitoring: We integrated Prometheus and Grafana to monitor our applications and infrastructure, ensuring high availability and performance through real-time insights.

Additional Repository

Infrastructure

image

In the course of developing our infrastructure, we tackled a range of infrastructure challenges and optimizations. Below are key resources and discussions that provide insights into our decision-making process and the solutions we implemented:

Deployment and Configuration with Terraform

Cost Optimization Strategies

Monitoring and Metrics

Security Enhancements

Backend

Queue System Architecture

  • Queue System Design Issues: Discusses considerations for preventing update losses, implementing non-blocking APIs, and choosing data structures for the queue system.

Project Package Structure and Conventions

API Optimization and Testing

CD Pipeline

image

Performance Test

Performance Test Result

Cost Management and Test Scripts

Database and Monitoring Setup

Performance Test Report

  • Improved Slow Queries by adding an index to a single-column with 1 million records.
  • Observed changes in CPU performance due to encryption: increased CPU core count and observed changes in encryption difficulty based on encryption level adjustments.
  • Observed changes in JVM CodeHeap and performance by repeating the same test after process creation.
  • Improved performance of SELECT COUNT(*) on ten million records by implementing NoOffset.
  • Introduced a queue system after considering competition for locks on a single resource (=Event) and observed tests.
  • Improved CPU resource usage by modifying thread pool strategy for thread creation.
  • Improved Pending Connection by modifying DB Connection Pool strategy.
  • Improved latency by applying Redis caching.

Contributors

Junha Ahn Hayoung Lim Jeongseop Park Minjun Kim
@junha-ahn @hihahayoung @ParkJeongseop @minjun3021
Infrastructure (Leader) Infrastructure Backend Backend