Inflearn brand logo image
Inflearn brand logo image
Inflearn brand logo image
Programming

/

Back-end

Improving Backend Application Performance - Basics

This is a follow-up lecture to 'Testing Backend Application Performance', and it will lay the foundation for improving the performance of the backend application you created.

(4.8) 8 reviews

311 learners

  • foo
3시간 만에 완강할 수 있는 강의 ⏰
성능측정
stress-testing
artillery
cache
performance-tuning
asynchronous-programming

Reviews from Early Learners

What you will learn!

  • API Performance Testing

  • Why server resources affect performance and how to improve it

  • Improving performance using asynchrony

  • How to create unique keys without duplicate checks using Snow Flakes

  • Improving query performance using indexes and caches

If you have done a performance test,
This time, we should try to improve performance, right?


As promised in the last performance testing lecture, we're back with a performance improvement lecture 🤗


The biggest change I've experienced since I started working in a team, as opposed to when I was developing alone, is measuring and improving performance. When I was developing applications on my own, the small number of users meant performance wasn't a major issue. However, as we process more data and traffic increases, I've realized that performance testing is essential . Even if a feature works well, poor performance can easily become a point of failure for the entire system, significantly impacting the user experience.

This lecture covers performance testing to address these issues and how to improve the API's logic accordingly . Using a shortened URL service as an example, we've prepared an easy-to-understand method for gradually improving the performance of your backend application.

First, we'll examine the basic code of the shortened URL application and deploy it to a server. We'll measure the performance of the creation and query APIs, explore potential performance improvements, and implement performance improvement methods one by one.

For the generation API, performance can be improved by increasing the number of request processing threads, increasing the server size, and separating response and generation. Learn how asynchronous processing and the snowflake algorithm can significantly improve the performance of the generation API.

To improve the performance of the query API, we'll cover methods such as adding database indexes, utilizing caches, and leveraging windowing. Through hands-on practice, you'll learn how to significantly improve query performance.


Analyze API-specific logic to derive performance improvement measures.


Eliminate duplicate URL key check logic using Snowflake


Presenting step-by-step performance improvement plans and confirming performance test results


Learn about these things

1⃣ How to improve performance by increasing server resources

There are various resources in an application server that affect performance. These range from physical resources like CPU, memory, and disk to software resources like threads and connections. All of these ultimately impact performance. This lecture explores how these server resources impact performance and how to improve it.

2⃣ Reducing Latency Using Asynchrony

The performance of an application perceived by the client, the API user, is ultimately determined by latency, the time it takes for a request to be responded to. Ultimately, if the client receives a faster response for the same task, the API's performance will be perceived as better. However, if the client is not a true user but another server, this will impact the overall system performance. Let's explore performance enhancement methods that leverage asynchrony to improve this aspect.

3⃣ Improving query performance using indexes and caches

When discussing query performance, indexes and caches are inevitably mentioned. Indexes are primarily handled at the database level, while caches exist in various forms, including within-application caches and shared caches. While this lecture doesn't delve into the specifics of indexes and caches, it does demonstrate how their presence can significantly impact API performance.

4⃣ Improving Update Query Performance Using Windowing

When update queries targeting the same record are continuously executed, locks on the record can cause a sharp performance degradation. This is commonly referred to as a "hot spot." While there are various ways to improve performance by addressing the hot spot issue, we'll address it through windowing, which is appropriate for increasing the redirectCount of a shortened URL.

*) The content covered in the lecture is closer to batch processing, but it has the same idea as windowing. If you change it to leverage Kafka, you can easily convert it to windowing.

Things to note before taking the course

Practice environment

  • Operating System and Version (OS): Windows 10,

  • Tools used: Intellij Community 2023.2, Google Chrome


Learning Materials

Player Knowledge and Precautions

  • We use Vultr for our cloud service, but you can also use other cloud services like AWS or GCP. However, there will be some differences, such as firewall settings, when using other cloud services. However, I believe you'll gain more by researching these issues yourself and experiencing them firsthand.

  • We're conducting performance testing using Artillery, which we used in our previous performance testing lecture. Performance testing using nGrinder is briefly described in the appendix.

  • If you have any questions while taking the course, please leave a question. I'll update the information if necessary.


Recommended for
these people

Who is this course right for?

  • Anyone who has taken the previous lecture, ‘Testing Backend Application Performance’

  • Anyone who wants to learn about widely used methods to improve API performance

Need to know before starting?

  • Backend application development experience

  • Interested in or experience with performance testing

Hello
This is

5,196

Learners

220

Reviews

104

Answers

4.9

Rating

9

Courses

안녕하세요.

멘토링을 하면서 주니어 개발자들이 어려워 하는 개념들에 대해 어떻게 하면 쉽게 전달할 수 있을지에 대해서 많은 고민을 하고 있는 푸(Foo)라고 합니다.

잘 부탁 드리겠습니다.


이력

  • 2019. 08 ~ 현재 : 카카오 자바 백엔드 개발자

  • 2021. 08 ~ 현재 : programmers 백엔드 데브코스 멘토

  • 2021. 12 ~ 현재 : F-Lab 자바 백엔드 멘토

 

  • 이것이 취업을 위한 백엔드 개발이다 with 자바(링크)

 

기타 이력 및 타 플랫폼 강의들은 아래 GitHub 링크에서 확인할 수 있습니다.

GitHub - https://github.com/lleellee0

Curriculum

All

17 lectures ∙ (2hr 39min)

Published: 
Last updated: 

Reviews

All

8 reviews

4.8

8 reviews

  • 원덕희님의 프로필 이미지
    원덕희

    Reviews 93

    Average Rating 4.8

    5

    100% enrolled

    좋은 강의 감사합니다.

    • 이준형(Foo)
      Instructor

      원덕희님 강의 완강하느라 고생 많으셨습니다!

  • shameless8님의 프로필 이미지
    shameless8

    Reviews 1

    Average Rating 5.0

    5

    100% enrolled

    성능 개선에 관심이 많아서 강의를 들었는데 도움이 많이 되었습니다

    • 쿄큐큐님의 프로필 이미지
      쿄큐큐

      Reviews 49

      Average Rating 4.9

      5

      100% enrolled

      • 이준형(Foo)
        Instructor

        쿄큐큐님 수강평 남겨주셔서 대단히 감사합니다!! 완강하느라 고생하셨습니다.

    • gihun.kim님의 프로필 이미지
      gihun.kim

      Reviews 1

      Average Rating 4.0

      4

      100% enrolled

      • 이준형(Foo)
        Instructor

        gihun.kim님 수강평 남겨주셔서 감사합니다! 완강하시느라 고생 많으셨습니다. (_ _)

    • hanumoka님의 프로필 이미지
      hanumoka

      Reviews 48

      Average Rating 4.4

      4

      100% enrolled

      다음강의 기대할게요.

      • 이준형(Foo)
        Instructor

        hanumoka님 수강평 남겨주셔서 감사합니다. (_ _)

    $30.80

    foo's other courses

    Check out other courses by the instructor!

    Similar courses

    Explore other courses in the same field!