RSS Parrot

BETA

๐Ÿฆœ Tech Blog by hojongs

@hojongs.github.io@rss-parrot.net

I'm an automated parrot! I relay a website's RSS feed to the Fediverse. Every time a new post appears in the feed, I toot about it. Follow me to get all new posts in your Mastodon timeline! Brought to you by the RSS Parrot.

---

Spring Boot, Kotlin, Kubernetes, Docker, DevOps ๋“ฑ์— ํ˜ธ๊ธฐ์‹ฌ์ด ๋งŽ์€ ํ•œ ์„œ๋ฒ„ ๊ฐœ๋ฐœ์ž์˜ ์ง€์‹ ์ €์žฅ์†Œ

Your feed and you don't want it here? Just e-mail the birb.

Site URL: hojongs.github.io/

Feed URL: hojongs.github.io/feed.xml

Posts: 5

Followers: 1

Redis: Redlock(Distributed lock) ์•Œ๊ณ ๋ฆฌ์ฆ˜ ๋ฐ Java ๊ตฌํ˜„์ฒด, ๊ทธ๋ฆฌ๊ณ  ๋น„ํŒ

Published: September 17, 2023 07:05

Redis์—์„œ ์ œ์•ˆํ•œ Redlock(DLM implementation) ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ์ดํ•ดํ•˜๊ธฐ ์œ„ํ•ด Redis ๊ณต์‹ ๋ฌธ์„œ๋ฅผ ์ฝ์œผ๋ฉด์„œ ์ผ๋ถ€ ๋‚ด์šฉ์„ ์ •๋ฆฌํ–ˆ๋‹ค. ์šฉ์–ด์ง‘: Redlock Reference: https://redis.com/glossary/redlock/ Redlock์— ๋Œ€ํ•œ ๊ฐ„๋‹จํ•œ ์†Œ๊ฐœ Redis๋ฅผ ์‚ฌ์šฉํ•œ ๋ถ„์‚ฐ ์ž ๊ธˆ Reference: https://redis.io/docs/manual/patterns/distributed-locks/ ๊ธฐ์กดโ€ฆ

jitter(Retry backoff): jitter ์‚ฌ์šฉ ์ด์œ  ๋ฐ ๋ ˆํผ๋Ÿฐ์Šค๋“ค

Published: September 14, 2023 15:00

MSA ๋˜๋Š” MSA ํ™˜๊ฒฝ์ด ์•„๋‹ˆ์–ด๋„ ์™ธ๋ถ€ ์„œ๋น„์Šค ๋˜๋Š” ์‹œ์Šคํ…œ ์žฅ์• ๋กœ ์ธํ•ด ์™ธ๋ถ€ ํ˜ธ์ถœ์ด ์‹คํŒจํ•  ์ˆ˜ ์žˆ๋‹ค. ์ผ๋ถ€ ์„œ๋น„์Šค์™€ ์‹คํŒจ๊ฐ€ ์‹œ์Šคํ…œ ์ „์ฒด ์žฅ์• ๋กœ ๋ฒˆ์ง€๊ธฐ๋„ ํ•œ๋‹ค. ์‹คํŒจ๋ฅผ ์™„์ „ํžˆ ๋ฐฉ์ง€ํ•  ์ˆ˜๋Š” ์—†๋‹ค. ํ•˜์ง€๋งŒ ํƒ„๋ ฅ์ ์ธ ์‹œ์Šคํ…œ์„ ๊ตฌ์ถ•ํ•˜์—ฌ ์ผ๋ถ€ ์„œ๋น„์Šค๊ฐ€ ์‹คํŒจํ•˜๋”๋ผ๋„ ์ „์ฒด ์‹œ์Šคํ…œ์€ ๋ฌธ์ œ์—†์ด ๋™์ž‘ํ•˜๋„๋ก ํ•  ์ˆ˜๋Š” ์žˆ๋‹ค. ํƒ„๋ ฅ์ ์ธ ์‹œ์Šคํ…œ์„ ๊ตฌ์ถ•ํ•˜๊ธฐ ์œ„ํ•ด ํ™œ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ๋„๊ตฌ๋“ค๋กœ timeout, retry, backoff๊ฐ€ ์žˆ๋‹ค. jitter๋„ ๊ทธ ์ค‘ ํ•˜๋‚˜, ์ฆ‰ ํƒ„๋ ฅ์ ์ธโ€ฆ

Spring Async Task vs Kotlin coroutines

Published: August 31, 2023 00:52

Keyword: Spring Framework, Async Task, Kotlin, Coroutine ํŠน์ • ์„œ๋น„์Šค์—์„œ ์—ฌ๋Ÿฌ ๊ฐœ์˜ Elasticsearch query๋ฅผ ์š”์ฒญํ•˜๋Š” API๊ฐ€ ์žˆ๋‹ค. ์ด API๋Š” query๋ฅผ ์ˆœ์ฐจ์ ์œผ๋กœ ์š”์ฒญํ•˜๊ณ  ์žˆ์—ˆ๊ณ , query์˜ ๊ฐœ์ˆ˜๊ฐ€ ์ฆ๊ฐ€ํ•˜๋ฉด์„œ latency๊ฐ€ ์ ์  ์ฆ๊ฐ€ํ•˜๋Š” ๋ฌธ์ œ๊ฐ€ ์žˆ์—ˆ๋‹ค. ์ฟผ๋ฆฌ ์„ฑ๋Šฅ์„ ๋†’์ด๊ธฐ ์œ„ํ•ด Elasticsearch ์ฟผ๋ฆฌ๋ฅผ ๋ณ‘๋ ฌ๋กœ ์ˆ˜ํ–‰ํ•˜๋„๋ก ๋ณ€๊ฒฝํ•˜์˜€๋‹ค. ์ด๋ฅผ ํ†ตํ•ด 15์ดˆ~100์ดˆ ์ •๋„ ๊ฑธ๋ฆฌ๋˜ API๋ฅผโ€ฆ

Spring WebFlux: Client disconnection ํƒ์ง€ ๋™์ž‘ ๋ฐฉ์‹

Published: August 25, 2023 15:00

Keyword: Spring, WebFlux, Spring MVC, Network, TCP/IP, HTTP, Netty, Servlet Spring WebFlux ์„œ๋ฒ„์—์„œ doOnCancel์„ ํ†ตํ•ด ๋กœ๊ทธ๋ฅผ ๋‚จ๊ฒผ๋”๋‹ˆ, client๊ฐ€ ์š”์ฒญ์„ ๋Š์—ˆ์„ ๋•Œ ๋กœ๊ทธ๋ฅผ ๋‚จ๊ธธ ์ˆ˜ ์žˆ๋Š” ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์—ˆ๋‹ค. ์ด๋Š” client์—์„œ ์„ค์ •๋œ ํƒ€์ž„์•„์›ƒ ์ดˆ๊ณผ๋กœ ์ธํ•œ ์—ฐ๊ฒฐ ์ข…๋ฃŒ์˜€๋‹ค. Spring MVC์—์„œ๋Š” ์ด๋Ÿฌํ•œ ๋กœ๊ทธ๋ฅผ ๋‚จ๊ธฐ๋Š” ๊ฒƒ์ด ๊ทผ๋ณธ์ ์œผ๋กœ ๋ถˆ๊ฐ€๋Šฅํ•˜๋‹ค. ๊ทธ ์ด์œ ๊ฐ€ ๋ฌด์—‡์ผ๊นŒ?โ€ฆ

Spring Retry: RetryPolicy๋กœ Exception ๋ถ„๊ธฐ ์ฒ˜๋ฆฌํ•˜๊ธฐ

Published: August 25, 2023 15:00

Keyword: Spring Retry, Retryable, RetryPolicy, MaxAttemptsRetryPolicy, Backoff Spring framework์— ์žˆ๋Š” Retry ๊ธฐ๋Šฅ์„ ํ™œ์šฉํ•˜์—ฌ Elasticsearch client requset ์‹คํŒจ ์‹œ retryํ•˜๋ ค๊ณ  ํ•œ๋‹ค. ์ด ๋•Œ ElasticsearchStatusException์˜ ๊ฒฝ์šฐ ํ•˜์œ„ type์— ๋”ฐ๋ผ retry ์—ฌ๋ถ€๋ฅผ ๋ถ„๊ธฐ ์ฒ˜๋ฆฌํ•˜์˜€๋‹ค. Spring Retry?โ€ฆ