Automatically translated.View original post

Don't let there be another second.

On September 12, 2025, Cloudflare experienced a headache because its dashboard system and API had crashed for over an hour, not due to an external attack, but purely a bug that the dev team wrote.

.

The problem comes from the wrong way to use the React hook (useEffect). Usually, useEffect works when the specified conditions change, but the team pushes constantly changing variables into the dependency array, resulting in the function being recursed non-stop. Every time the dashboard rendering page is like firing an API into the Tenant Service API, which should only run once per page load. Finally, the API cannot be loaded. It spreads to authentication and causes other APIs to collapse.

.

At first, the team tried to solve the problem by adding resources to the Tenant API, but it didn't help because the request kept coming in and reverting the wrong code until finally having to pry the global rate limit to reduce the system load to recover the situation.

.

Tom Lianza, vice president of engineering at Cloudflare, acknowledged that this is a classic example of unguarded useEffect, although the React document itself warns against this, so it turned out to be an expensive lesson, and it also reinforces that even though it's a company known for global DDoS protection, it still misses its own DDoS.

.

Source: theregister

# IT News # Includes IT matters # Cough to know # IT

2025/9/30 Edited to

... Read moreเหตุการณ์ที่ Cloudflare ประสบพบปัญหาระบบล่มครั้งใหญ่จากบั๊กการเขียนโค้ด useEffect ของ React เป็นตัวอย่างที่ชัดเจนว่าการดูแลและทดสอบโค้ดอย่างระมัดระวังเป็นสิ่งสำคัญมากในวงการเทคโนโลยีสมัยใหม่ ในเชิงเทคนิคแล้ว useEffect เป็น hook สำคัญที่ช่วยให้สามารถจัดการผลกระทบ (side effects) ในแอปพลิเคชัน React ได้ เช่น การเรียกข้อมูลจาก API หรือการตั้งค่าบางอย่าง เมื่อใช้ผิดวิธี เช่น ใส่ dependency ที่เปลี่ยนแปลงบ่อย ๆ ลงใน dependency array ฟังก์ชันจะถูกเรียกซ้ำไม่หยุด ทำให้ระบบถูกยิง request อย่างไม่หยุดยั้ง เหมือนเกิด API flood attack ภายในระบบเอง ซึ่งครั้งนี้เรียกว่าเป็น DDoS attack ที่มาจากภายใน (self-inflicted DDoS) สำหรับผู้พัฒนาระบบ การเข้าใจอย่างลึกซึ้งเกี่ยวกับการทำงานของ hook แต่ละตัวรวมถึง lifecycle ของ React component เป็นเรื่องจำเป็น เพื่อหลีกเลี่ยงปัญหาการทำงานซ้ำซ้อน นอกจากนี้ การใช้เครื่องมือ monitoring และ rate limiting อย่างเหมาะสมก็เป็นแนวทางที่ช่วยลดความเสี่ยงที่ระบบจะถูกโจมตี หรือ overloaded โดย request ใด ๆ จากกรณีนี้ เห็นได้ชัดว่าบริษัทที่มีชื่อเสียงด้านความปลอดภัยและป้องกัน DDoS อย่าง Cloudflare ยังไม่อาจรอดพ้นจากข้อผิดพลาดที่เกิดจากทีมพัฒนาของตนเอง ซึ่งเป็นบทเรียนสำคัญที่องค์กรอื่น ๆ ต้องให้ความสำคัญกับการทดสอบโค้ด (code review) และการศึกษาเอกสารทางเทคนิคอย่างเคร่งครัด สุดท้าย ปัญหา API ล่มครั้งนี้ยังชี้ให้เห็นถึงความสำคัญของ global rate limit ที่เป็นเหมือนเกราะป้องกันขั้นสุดท้าย ซึ่งช่วยลดโหลดระบบและฟื้นฟูสถานการณ์ให้กลับสู่สถานะปกติเร็วขึ้นผู้พัฒนาจึงควรวางแผนมาตรการเหล่านี้ควบคู่ไปกับการพัฒนาระบบ เพื่อป้องกันเหตุการณ์ซ้ำรอยและรักษาเสถียรภาพของบริการให้ดีที่สุด

Related posts

Let’s Talk: That Itchy Feeling Down There
What many girls don’t realize is — the fabric of your underwear can make a huge difference. Synthetic materials, like polyester or nylon blends, might look cute, but they trap heat and moisture, creating the perfect home for bacteria to thrive. That can lead to itchiness, odor, even infection
FEELITS_SilkPanties

FEELITS_SilkPanties

1029 likes

Let’s Learn a New Language This Year!!
Ok girlies, this is the year that we are actually going to do what we've been saying we're gonna do... We are gonna learn a new language!! I don't know about you but I have been wanting to learn a second language for as long as I can remember! And this is the year that I do it! Let m
CompSkyy

CompSkyy

1910 likes

Second Britney edit 🩵
Another Britney edit #capcut #britneyspears #pinkpantheress #viral
𝓙𝓮𝓵𝓵𝔂 ⊹ ࣪ ˖

𝓙𝓮𝓵𝓵𝔂 ⊹ ࣪ ˖

1 like

Another Lazy Girl Dinner ❤️
We call this goulash in the south but I’ve heard it called chili Mac and chop suey. What do you call it?? #easydinnerrecipe #quickdinner #cookingathome #lazygirldinner
Farm & Table

Farm & Table

22.8K likes

why I let my cats sleep in my bed with me.
#storytime #lemon8contest Many of you loved my cat story about why I got my second cat. I thought it would be great to tell another story about my little angels from above. The sweet boy you see in the photo above is my little one Ziggy. If you read my other cat story, you know my mom f
Hailey Guldin

Hailey Guldin

51 likes

Don’t let this summer be a waste
“Summer 2025 is NOT about sitting on the sidelines watching life pass you by. This is your season to bloom, to heal, to glow, and to chase every dream you’ve been putting off. Don’t let fear, doubt, or procrastination steal another second from you. Whether it’s leveling up your mindset, body, bag,
𝕵𝖆𝖉𝖊 𝕭𝖑𝖚

𝕵𝖆𝖉𝖊 𝕭𝖑𝖚

1 like

Let’s Talk: That Itchy Feeling Down There
What many girls don’t realize is — the fabric of your underwear can make a huge difference. Synthetic materials, like polyester or nylon blends, might look cute, but they trap heat and moisture, creating the perfect home for bacteria to thrive. That can lead to itchiness, odor, even infection
FEELITS_SilkPanties

FEELITS_SilkPanties

4 likes

let’s talk about GENDER DISAPPOINTMENT🥲
hello ◡̈ I think there's a lot of negativity thrown at people for experiencing gender disappointment when discovering their baby's gender, and I find that so silly. It's perfectly normal to feel a little upset if you dreamed of having a daughter and end up with a son, or vice versa.
mom | sierra ◡̈

mom | sierra ◡̈

197 likes

Let’s get real here for a second ❗️❗️
Alrighty, let’s get a little vulnerable.. Just like most of you who deal with our sweet friend (eczema 🙄), I’ve had eczema since I was a little one. My skin is sensitive but my eczema has never been bad (thankfully 🙌🏾) but as of late, I had a little area become dryer than the rest of skin. I kno, i
TiahAuB

TiahAuB

96 likes

The Door That Shouldn’t Be There
When I moved in, I noticed the second door right away. Same paint, same handle as the front but it didn’t open. I tried the knob once, twice… locked tight. I figured it led to a closet or maybe another unit. The first few nights were quiet. Then, one night around 2 a.m., I heard it knocking. Three
Celeste✨

Celeste✨

7 likes

I Don’t Know How I Feel…
I was a big fan of If He Had Been With Me by Laura Nowlin … minus the tiara (if you know you know). When I heard there was going to be a second book from Finny’s point of view, I was so excited and fully expected my heart to be broken again. I didn’t make it very far into If Only I Had Told
Khloemyers

Khloemyers

32 likes

How To Be More Elegant
Becoming more elegant as a lady involves a combination of poise, style, grace, and confidence. Here’s a guide on how to cultivate elegance, including ways to walk and talk, essential wardrobe items, and more. ### How to Be More Elegant 1. **Posture**: Stand tall with your shoulders back. Good
Purple Flower

Purple Flower

336 likes

Don’t let another summer slip away!!
Today’s rapidly growing digital world makes it simple to work less and make MORE!! Especially when you follow a done-for-you program set on autopilot- There’s a reason why we are growing by the hundreds every single day! Jump in now, If I can do it, YOU CAN TOO! ⏬⏬⏬ #makemoneyonline
Melissa.SAHM

Melissa.SAHM

12 likes

Don’t throw away those Taco Bell reciepts!!!
1) • Some restaurant apps make you order & pay on the app in order to obtain member rewards points. The Taco Bell app does not require this! You can simply scan the receipt on the app & get your points * without * having to pay with your card or have your card linked to the app! Once your p
ImaPrincess33

ImaPrincess33

1 like

So let me get this straight...
Every year around this time, people start doing that “payday math” in their head. “If I buy this gift now… will I still have money for groceries?” “Can I squeeze this bill in before the 15th?” “Maybe I’ll just wait until next payday… again.” And listen — you’re generous. You’ve got a good h
Jackie Vangen

Jackie Vangen

63 likes

Let me introduce myself...
Not that I have time to keep up with another app but here we are anyway! I thought I'd introduce myself and if you've followed me over here from TikTok, there's probably some things you didn't know about me 🫶🏼 How are feeling about another app?? I'm actually loving the templ
Rach Gold

Rach Gold

27 likes

I can't let him go.....help
I'm 19. Here's a little short story of me and his story it's called: A Love That Felt Like Forever By Alyssa Hines It started with a random add on Snapchat on April 1st—a moment that would unknowingly alter two lives forever. Tokyo (not his real name) and I met with the kind of ea
Alyssa Hines

Alyssa Hines

7 likes

Don’t Let Your Fears Hold You Back
Okay first of all, b-roll waits for no one. Not even sharkira the robot vac. And second of all, let’s be real. I don’t LOVE every minute of my life. I’m a mom of 2 littles who runs a 6 figure business from home with no outside help. Life is HARD and I have a little menty b at least 1-2x a month.
TannerClemensCo

TannerClemensCo

10 likes

Let us watch and be sober 🙏🏼
Mariah Janell

Mariah Janell

19 likes

and you thought there were only 10
1. To know there is a God. (Exodus 20:2) 2. To have not other gods. (Exodus 20:3) 3. To know that He is one. (Deuteronomy 6:4) 4. To love Him. (Deuteronomy 6:5) 5. To fear Him. (Deuteronomy 10:20) 6. To sanctify His Name. (Leviticus 22:32) 7. Not to profane His Name. (Levit
TheVioletWitch

TheVioletWitch

12 likes

🛑Stop second guessing yourself🛑
Learn to train and trust your intuition. Believe in yourself and your decisions. It’s your life to live and you are allowed to decide what you want to do with it. Not everyone’s opinion matters. It’s time to come to terms with this. Remember that not everyone is gonna be there with you through
Shadow Ch1ld

Shadow Ch1ld

21 likes

What connects us to one another.
#habit #respect #socials #selfimprovement #selfgrowth
leslieharvin377

leslieharvin377

6 likes

Don’t let your fear keep you from trying ✨
Don’t let your fear keep you from trying ✨ So many people I come across yearn for more than just the same routine. Everyone has in one way or another gotten comfortable in what society says we should be. No one wants to live their life on autopilot. There is a version of you, you need to ste
JoshsalynE

JoshsalynE

27 likes

Don’t Get Caught in the Hype
🪩 ALL THAT GLITTERS IS NOT GOLD 🪩 🖤 I’m seeing more and more posts involving this industry that are “How to’s” and “Positives”. Let me stop you there. I’ve been in this industry for half a decade, trust me when I say this is not for everyone. 🖤 Dancing/other jobs in this industry are now bei
Em

Em

25 likes

Don’t get a second job… try this side hustle that
I was exhausted. Working long hours, picking up extra shifts, and STILL struggling to save anything. Every time I thought about making more money, my only solution was more work. More hours. Less sleep. Less time with my family. Then I saw people online making money from their phones without clo
Samia

Samia

2 likes

BEFORE I LET GO✨
BOOK REVIEWWW !!!!! ⭐️Rating: 5/5⭐️⭐️⭐️⭐️⭐️ Book Description: Their love was supposed to last forever. But when life delivered blow after devastating blow, Yasmen and Josiah Wade found that love alone couldn't solve or save everything. It couldn't save their marriage. Yasmen wasn'
Braybarbie

Braybarbie

18 likes

Second Chance at Sunshine Inn by Amy Clipston
“I hereby bequeath fifty percent each of my said property, real, personal, or mixed, to Everleigh Alana Hartnett and Benjamin Cade Witherspoon III.” When Everleigh finds out that her godmother left her the inn that has always been kind of a second home, she is shocked. But when she realizes she’
Tiffreads

Tiffreads

1 like

This is your second chance. Don’t waste it.
If you woke up this morning, you have another chance. Don’t waste it. #WakeUpStrong #SecondChanceSaturday #DadMotivation #LevelUpLife #StayGrinding
theavereagedad

theavereagedad

3 likes

Don’t worry, there’s a second plateWaiting for me
#my plate 🤪 #food is my love language 😋 #
THATS_CRAZY❤️❤️

THATS_CRAZY❤️❤️

1 like

Don’t add shifts or a second job. Work Smarter
Instead if extra shifts or a second job, I found I can work from home and make more than my regular job. I have learned from a supportive group of Boss Women how to collectively have multiple streams of income that work for me. #workfromhomejobs💰 #workfromhomeforbeginners #highticketdigitalmar
Karen | Livey Haven Digital

Karen | Livey Haven Digital

0 likes

let me help you clear your skin sis🫶🏾
i love skin & everything about it! that’s why i wanna help yall who struggle with ingrowns & darkspots. i personally have had my struggle moments where it seemed like everytime i looked down i had a new ingrown😭😭 but now that i have a set regimen i maybe get 1 or 2 if any between waxes &
justbree🩷

justbree🩷

13 likes

✨Let me pyo Christian Edition ! ✨
👋🏼Helloooo loves , All these recommendations our my personal favorite. ☺️I love listening to them to start my morning, workout, or even on a walk with my dog. It’s another way to open up your ear gates to healthier alternatives to the soul. ❤️ Here are my personal ratings and what I believe the p
Jelina Perez

Jelina Perez

4 likes

Stop Working Second Jobs Just to Afford the Holida
Because I used to think hustle was the only solution too. Work more hours → earn more money → barely stay afloat. But all it really did was give me less time with the people I was working for. And I see so many parents doing the same thing — running delivery apps after bedtime taking weekend
DS 💰 Making Money Online

DS 💰 Making Money Online

1 like

Most people think a 2nd income means a second job
I used to think the only way to make more money was to work more hours. Another job. More time away from my family. More burnout. But the problem wasn’t effort… it was relying on one income source. There are people building a second income using just their phone — without quitting thei
scpromotes

scpromotes

0 likes

See more