Skip to Content
PortfolioQuesti

šŸ’” Key Technical Challenges & Solutions

Converting Synchronous Document Upload Logic to Asynchronous

  • Problem: Document upload process with OCR processing, Pinecone indexing, and document storage logic were all implemented synchronously in the Controller, causing Timeout Errors as they exceeded Azure AppService’s default Gateway Timeout (220 seconds)
  • Solution Process:
    • Reviewed converting OCR processing and Pinecone indexing logic to asynchronous after uploading PDF to Blob
    • Excluded Message Queue due to operational cost and budget constraints
    • Analyzed serverless-based asynchronous processing options
      • Batch Job: Deemed unsuitable due to inability for immediate execution and high costs
      • Function App: Limited by 10-minute single execution time constraint for entire logic processing
    • Implemented asynchronous processing using Azure Durable Function, advantageous for cost efficiency and long-running tasks
  • Results: Achieved 90%+ reduction in upload time from 230+ seconds to 22 seconds

Building Recurring Payment System

  • Problem: Need to implement recurring payment functionality through Toss Payments and establish a stable automatic payment system
  • Solution Process:
    • Implemented automatic payment logic using Azure Function Timer Trigger to execute daily at 2 AM
    • Built payment processing logic targeting users within 2 days of expiration
    • Resolved payment record storage failures due to schema mismatch after successful payments
      • Supplemented with manual data entry approach by sending userId and paymentsId through Sentry
    • Established automatic free plan downgrade system for payment failures over 3 days and user recovery guidance system
  • Results: Built stable automatic recurring payment system and established automatic recovery process for payment failures

Implementing User Plan-based Usage Limitation System

  • Problem: Required feature usage limitations based on subscription plans and real-time usage tracking, but direct MongoDB queries raised concerns about concurrency issues and performance degradation
  • Solution Process:
    • Implemented Proxy Layer that measures function execution time, stores in MongoDB, then updates usage through Cache
    • Transitioned to caching-based structure for performance optimization
    • Ensured cache consistency and prevented duplicate queries using Redis distributed locks
      • Immediate return when usage exists in cache
      • When absent, prevent duplicate queries through distributed locks, then query MongoDB and update Cache
    • Implemented dual storage structure synchronizing usage to both Cache and MongoDB after Proxy logic execution
  • Results: Resolved concurrency issues and optimized usage query performance, enabling stable operation of real-time usage limitation features

šŸ›  Other Implementations

  • HWPX Document Processing Feature Extension
    • Added HWPX image input functionality
    • Implemented Markdown-style HWPX conversion feature