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

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

23.3K likes

Second Hand Try-on
Trying on a few pieces I picked up from my local Buy Nothing group and feeling so grateful for this kind of community. I didn’t keep everything, but I found a handful of pieces that fit into my closet and feel like things I’ll actually reach for. The rest is going straight into my donation bin s
Cassie Izon

Cassie Izon

5 likes

The book cover for 'Hooked: A Never After Novel' by Emily McIntire, featuring a broken clock and red lips, with text overlays inviting readers to explore favorite quotes from the book.
A page from 'Hooked' by Emily McIntire, highlighting text about a character's trauma from childhood influencing their decisions and logical thinking.
A page from 'Hooked' by Emily McIntire, highlighting text describing Wendy's loyalty and forgiveness, and how she helps damaged hearts learn to love.
Let me convince you to read this book
This one is a conflicting one read if you can stomach morally grey characters and violance #booktok #bookinstagram #morallygrey #hooked #series
Manu Mahecha

Manu Mahecha

5 likes

A hand holds a partially open book, with a bookshelf in the background. Text overlay reads "IDK HOW I FEEL... If He Had Been With Me Sequel," expressing uncertainty about the book.
A hand holds the book "If Only I Had Told Her" by Laura Nowlin, featuring a red rose on its cover. Text describes the book's plot from Finn's perspective, detailing his unexpressed love for Autumn.
A hand holds two books: "If He Had Been With Me" and its sequel "If Only I Had Told Her." Text expresses the reader's excitement for the sequel from Finn's POV, but ultimately feeling let down.
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

34 likes

The image is a title slide for a post about improving Reels. It features the text "Read This Before You Post Another Reel" and "Reels flopping? Views feel low? It's not you, it's your structure. Let's fix it," with film icons and a camera.
This slide addresses "Problem 1: Weak Hook," advising to grab attention immediately in the first second of a Reel, suggesting starting with a big question or bold statement. A fishing hook icon is in the corner.
This slide highlights "Problem 2: No Captions," stating that 85% watch without sound. It advises adding on-screen text or auto-captions to ensure Reels are effective even on mute, with CC icons.
🚨 Don’t post another reel until you read this 👀
You're pouring time into content… but is it actually converting? Before you hit "post," make sure you're not missing these key steps that could make or break your reach. ⬇️ Read this, save it, and thank me later. #ReelTips #ContentStrategy #SocialMediaHelp #ReelsThatConv
Grow With Hope

Grow With Hope

11 likes

Can I Be Honest With You For a Second?
You’re not scared to start. You’re just comfortable staying the same. You say you want to make money online. You say you want a side hustle. You say you’re ready to change your situation. But when it’s time to actually move… You pause. You overthink. You tell yourself “maybe next week
Kelly Hare

Kelly Hare

10 likes

What’s in my hospital bag as a SECONDTIME mama🤍👶🏻
As a second time, mom, there are essentials that I think that every month should I post postpartum and here are a few. I believe that every hospital gives some postpartum essentials to mom’s. However, I left do I bring my own to to be prepared and to make sure I have everything that I need.
marycheyenne🕊️

marycheyenne🕊️

86 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

8 likes

Just wait till there’s enough for a second post😏
#tattoos♥️ #tattootour #tattoo
Holly 🤍

Holly 🤍

20 likes

A pregnant woman takes a mirror selfie, holding her baby bump. Text overlay reads 'Let's Talk Gender Disappointment' with pink female and blue male gender symbols, reflecting the article's theme.
A pregnant woman takes a mirror selfie, holding her baby bump. Text overlay expresses her dream of being a girl mom and her genuine upset about her second baby being a boy.
A pregnant woman takes a mirror selfie, holding her baby bump. Text overlay discusses her feeling that her dream of having a daughter was shattered and her uncertainty about having more children.
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

A woman in a pink ruffled top and ripped jeans poses with her back to the camera in front of a black New York Fashion Week backdrop with sponsor logos.
A woman in a pink ruffled top and ripped jeans smiles at the camera, standing in front of a black New York Fashion Week backdrop with sponsor logos.
A woman in a pink ruffled top and ripped jeans stands inside a white display box featuring New York Fashion Week event details and sponsor information.
Don‘t really understand some mean girls 🤌🍋
Things started from me and my friend going to a fashion show plus my birthday on that day. Finally I find an occasion to wear my pink jellyfish top🎀 I know I could be over dressed but it‘s Fashion Week weekend PLUS this is NEW YORK!Not surprised to see people wear anything.💃 On the way to sub
Sara Li

Sara Li

9 likes

An open journal displays page 54, titled "Mirror-Gazing," detailing an exercise to gaze into a mirror for 5-10 minutes and reflective questions about thoughts, emotions, and breakthroughs. A hand with painted nails holds the book.
Let’s Get Into some Shadow-Work🦋✨
I’ve been working in my shadow-work journal and I’m currently on page 54 working in mirror gazing. Save this prompt and grab a sheet of paper try mirror gazing and answer the reflective questions and comment how it made you feel? Update: I couldn’t do it at first. I laughed I got uncomfortable.
Jasmine

Jasmine

8 likes

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

leslieharvin377

6 likes

The book cover for "Deep End" by Ali Hazelwood, featuring two hands clasped together, with text overlays "LET ME CONVINCE YOU TO READ THIS BOOK" and "BY MY FAVORITE QUOTES".
A page from the book "Deep End" with highlighted text, including quotes like "I think every relationship is the same." and "You won't know until you try." A hand holds the bottom corner.
A page from the book "Deep End" with highlighted text, including a quote about existence and being a "toy," "His favorite. Irreplaceable." A hand holds the bottom corner.
Let me convince you to read this book
Favorite book boyfriend of f the season?? #books #booktok #book recommendations #bookboyfriend #bookwormsoflemon8
Manu Mahecha

Manu Mahecha

4 likes

A MacBook Pro displays the Roam Research app with a graph overview of interconnected notes, including 'Daily Notes' and 'Morning Review'. The screen is titled 'SECOND BRAIN APPS To organise your digital life', with a white rabbit figurine in the background.
The Roam Research app interface is shown, highlighting its bidirectional linking system with a 'Graph Overview' and 'Daily Notes'. The image also features the Roam Mobile app icon and text describing its focus on connecting ideas.
The Obsidian app interface is displayed, showcasing its powerful linking system with a 'Graph of Writing is telepathy' and a note titled 'Writing is telepathy'. The image also includes the Obsidian app icon and a description of its note-connecting capabilities.
Second Brain Apps to organise your digital life
Just think about having a second brain to help you remember important stuff like notes, ideas, and tasks, so you can think more freely. The main idea of this "second brain" is to let your real brain focus on being creative and smart, instead of worrying about remembering and organizing e
Reverelia

Reverelia

404 likes

Let us watch and be sober 🙏🏼
Mariah Janell

Mariah Janell

21 likes

This will lead you to a second chance
Most candidates disappear after a rejection. This message does the opposite. It shows emotional maturity. It shows respect for the decision. And it shows that your interest in the company is genuine — not desperate. You’re not asking for another interview. You’re not trying to change the
JobHire.ai

JobHire.ai

1 like

A collection of medical supplies including skin cleanser, alcohol prep pads, petroleum jelly, syringes, needles, and a pink card stating "SMOOTH SKIN IS HEALTHY SKIN," laid out on a white surface, suggesting preparation for a medical or aesthetic procedure.
A "GLP-1 Double Check Tool" form with handwritten details about GLP-1 medications, alongside a syringe and a vial of Semaglutide, indicating preparation for a medication injection.
An aesthetic skin treatment machine with a screen displaying "Manifold Clean" and various solution bottles, including "GLYSAL PREP CLO," "RINSEAWAY," "Activ-4 Cleanse," and "Antiox+," used for facial procedures.
Survive Don’t Thrive: Non-Negotiables as a Nurse ✨
No matter how long I have been a nurse, some things in nursing are just non-negotiable — no matter what specialty you’re in 🩺✨. Whether you’re running around at the bedside or finessing injections as an aesthetic nurse, there are a few skills that I truly believe every nurse needs under their belt
Lynn

Lynn

24 likes

What is SecondSkin? Why is it used on tattoos?
(To be clear, this is a brand and there are others like Saniderm and Derm Shield from Recovery Aftercare) It’s a thin, transparent adhesive that protects your new tattoo from dirt and bacteria, to help it heal safely with less maintenance. Some people may have reactions to adhesive, so be sure to d
Mia Parziale

Mia Parziale

7 likes

let’s help one another! 🍋🫶🥰
I would probably say that the few things im struggling with is my triceps, inner thigh, and core. I have seen progress in my back, biceps, as well as butt and have also incorporated cardio which I have begun to enjoy! any tips when it comes to core, my inner thighs, and my triceps? over the summer,
hailey 💞

hailey 💞

11 likes

I didn’t walk into Prison happy 🌸
I didn’t walk into prison happy joyous and free. I was angry. It felt unfair and I was brokenhearted. I was attached to my story. There was a lot of emotion involved and the pain I felt was intense. I remember a friend of mine in prison saying, “I just don’t want to stay stuck.” I said, “What do yo
Portia Louder/Living Louder

Portia Louder/Living Louder

32 likes

3 things they don’t tell you about Newborns
I feel like a lot of stress postpartum comes from false expectations. People talk like babies are meant to sleep really well on there on in a crib from day one, and people act like newborns are “needy” if they want to be held. This makes parents feel like they are doing something wrong if their bab
kellythedoula

kellythedoula

77 likes

An overhead view of a two-story apartment floor plan. The top section shows the 2nd floor with two bedrooms and bathrooms, while the bottom section displays the 1st floor with a living room, dining area, kitchen, and half bath.
A modern kitchen island with a white countertop and two white bar stools. The text overlay points to the stools, stating 'Simple chairs,' aligning with the user's vision for simple cream/brown chairs.
A cozy balcony patio overlooking a city skyline at sunset. It features two white wicker chairs, a small round table, and potted plants, with text indicating the user's plan to decorate their patio.
Let’s Manifest Through Decoration 🤩
Let’s decorate my soon-to-be #normalhouse aka apartment ❤️ My vision for any home is browns, nudes, neutrals, etc. 👩🏽‍🍳: I already have a black and white theme from Freshman year in college and I’m ready to step it up: give me a fresh set of wooden utensils and brown towels! I’ll take the brow
Destini India🌟

Destini India🌟

271 likes

Let Me DeInfluence You | Reach Your Money Goals!
Stop, Scroll, Breathe: The Deinfluencing Guide to Saving More We've all been there - scrolling through social media, bombarded by the latest "must-have" item. But before you hit "buy" on another impulse purchase, let's deinfluence that urge and turn you into a saving supe
Jenn | Finance

Jenn | Finance

17 likes

See more