Cloudflare කියන්නේ ලොකු Internet ආරක්ෂක සහ වේග වැඩි කරන සේවාවක්. ඔබගේ වෙබ් අඩවිය (උදාහරණය: ඔබගේ business website, online class site එක) සහ userලා අතර protect කරන, filter කරන, speed වැඩි කරන මැදිවැටියක් වගේ වැඩ කරන්නේ Cloudflare.
Cloudflare එකම සේවයක් නෙමෙයි. ඒකේ ඇතුලේ: CDN (Content Delivery Network), DNS, DDoS protection, SSL/TLS, WAF (Web Application Firewall) වගේ ගොඩක් දේවල් තියෙනවා.
Cloudflare කමක් නැත්තම් වෙබ් අඩවිට වෙන්නෙ මොකක්ද?
Think කරන්න: ඔබගේ site එක US server එකක තියෙනවා කියලා. කෙනෙක් Sri Lanka එකෙන් visit කරනවා.
- Cloudflare නැත්තම්: request එක direct ඔය US server එකට යනවා → දුර වැඩියෙන් → latency වැඩි
- Cloudflare තියෙනකොට: ලොව පුරා තියෙන Cloudflare servers එකක් (edge server) Sri Lanka වලට ලගින් තියෙනවා. User request එක මුලින්ම එන එක Cloudflare edge server එකට. Cached copy එක තියෙනව නම් ඒකෙන්ම page එක ලේසියෙන් එනවා.
ඒකෙන්: Speed වැඩි වෙනවා, Server load අඩු වෙනවා, Security වැඩි වෙනවා.
Cloudflare කරන්නෙ මොනවද? (මූලික සේවාවන්)
1. CDN – වේගවත් content delivery එක
CDN කියන්නේ ලොව පුරා හරහා පැතිරුණු server network එකක්. Cloudflare CDN එකට over 330+ locations තියෙනවා කියලා කියනවා. ඒ නිසා user කොහෙ සිටිනවාද කියලා බලලා, ලග server එකෙන් content serve කරනවා. මේකෙන් page load time ගොඩක් අඩු වෙනවා.
Example: ඔබේ site එකේ images, CSS, JS files Cloudflare cache කරගත්තම, user අයෙ අයෙ visit කරනකොට origin server එකට යන්න ඕනි නැති වෙලා, Cloudflare edge server එකෙන්ම ගන්න පුළුවන්. Bandwidth cost එකත් අඩුවෙනවා.
2. DNS – ලෝකයේ Phone Book එක
Domain එක (උදා: gayanathmadusankha.com) IP address එකකට map කරලා දෙන service එක DNS. Cloudflare DNS යොදාගත්තම:
- DNS response වේගවත්
- DNSSEC වගේ security feature තියෙන නිසා DNS spoofing attacks වලින් protection
3. Security – DDoS, Bots, WAF
Cloudflare එක ඇත්තටම ලොකේ වෙබ් ආරක්ෂක layer එකක් විදිහට වැඩ කරනවා.
- DDoS Protection: ලොකු traffic flood එකක් එනකොට attack filter කරලා origin එක protect කරනවා.
- Bot Management: හොඳ bots (Googlebot වගේ) සහ කෙල block කරන්න ඕන මෝඩ bots වෙන වෙනම හඳුනාගෙන rule දාල manage කරගන්න පුළුවන්.
- WAF: SQL Injection, XSS වගේ common web attacks firewall rules වලින් block කරනවා.
4. SSL/TLS – HTTPS ලේසියෙන්
Cloudflare එකෙන් Free SSL certificates දෙන නිසා HTTP site එක HTTPS වෙතට easy convert කරන්න පුළුවන්. User ↔ Cloudflare ↔ Origin server අතර traffic encrypt කරන modes තියෙනවා (Flexible / Full / Full Strict වගේ).
Cloudflare මේ තරම් වැදගත් උනාට හේතුව?
අද Internet එකේ websites වලින් 20%කට වඩා Cloudflare service use කරනවා කියලා stats තියෙනවා. අපි භාවිත කරන බොහොම වැදගත් සේවාවන් – chat apps, social networks, online shops, SaaS apps ගොඩක් Cloudflare මත රිලයි කරනවා.
ඒ නිසා:
- Cloudflare වැඩ කරද්දි – sites ගොඩක් දුර safe, fast, online.
- Cloudflare issue එකක් ආවොත් – එකවර ලොකු පාරිභෝගික ගණනකට Internet “බිඳ වැටුණා” වගේ අත්දැකීමක් ලැබෙනවා.
මේ ලගදි Cloudflare බිඳවැටුනු Incident එක (2025 නවැම්බර් 18)
2025 නවැම්බර් 18 වන දින ලොකු Internet भागයක් අකර්මන්ය වුනා. ඒකට main හේතුව Cloudflare outage එකක්. මේ වෙලාවෙ X (Twitter), ChatGPT, Uber, Canva, Spotify වගේ වෙබ් අඩවි සහ apps ගොඩක් අළුත් වෙලා ගියා.
ඇයි බිඳවැටුනේ? (Technical idea එක සරලව)
Cloudflare තමන්ගේ Bot Management system එක update කරන්න configuration file එකක් (feature file) use කරනවා. මේ file එකයේ size එක අහම්බෙන් දෙගුණකින් වැඩි වුනා.
- Feature file එකට extra entries ගොඩක් add වුනා.
- ඒ file එක Cloudflare network එකේ machines ට propagate වුනා.
- Software එකට file size limit එකක් තිබුණා. අලුත් file එක ඒ limit එක cross කරලා.
- Result: එක්කෝම අර bot management traffic handle කරන software එක crash වෙලා traffic route කිරීම අස්ථිර වුනා.
ආරම්භයේදී Cloudflare team එකට මේක දැඩි DDoS attack එකක් වගේද කියලා සැකයක් තිබුණා. ඉස්සරහින් analysis කරලා බලද්දි එය internal bug + configuration change එකකට බද්ධ issue එකක් කියලා හොයාගත්තේ.
Outage එකෙන් වෙච්ච දේවල්
- Local time අනුව උදේ පැය කිහිපයක් websites ගොඩක් වලට “Internal Server Error”, “Bad Gateway” වගේ error message දිස් වුනා.
- Usersලාට social media, online services use කරන්න බැරි වෙලා Downdetector වගේ sites හරහා error reports ගොඩක් ගියා.
- Cloudflare CTO සහ team එක මේක “අපේ වැරදි” කියලා public apology එකක් දුන්නා, “අපේ customerලාටත්, internet එකටත් අපි fail වුනා” කියලා සෘජුවම පිළිගත්තේ.
- Fix එක deploy කරලා පැය කිහිපයකින් core traffic almost normal වුනා. හරහා systems monitor කරමින් extra load manage කරගත්තේ.
අපිට ඉගෙනගන්න පාඩම්
මෙම incident එකෙන් පේන main lesson ටික:
- Internet එක centralized services කීපයක් මත ගොඩක් heavily depend වෙනවා. ඒකට එකක් down උනම ලොකු effect එකක්.
- Internal software bug + normal configuration change එකක්වත් global outage එකකට හේතුව වෙන්න පුළුවන්.
- Observability, safe deployment, config limits, roll-back plans වගේ දේවල් Internet infra companies ට ගොඩාක් critical.
Cloudflare භාවිතා කරනවද? – Dev/Teacher හැටියට හිතන්න දේවල්
ඔබ වෙබ් developer / teacher / student හැටියට Cloudflare ගැන හිතනකොට:
- Small site / blog / portfolio එකකට – Free plan එකෙන් HTTPS + basic security + CDN ලොකු ලාභයක්.
- Online class / LMS / business site එකකට – WAF rules, Rate limiting, Bot protection යොදාගෙන class recordings, notes, payment pages protect කරන්න පුළුවන්.
- Tech student ට – Cloudflare use කරලා DNS, CDN, reverse proxy, caching, security practically ඉගෙනගන්න ලොකු ලයිබ් ආරංචියක්.
Cloudflare වැඩ කරන හැටි Short Example එකක්
- ඔබගේ domain එක Cloudflare ට add කරනවා.
- Nameserver change කරලා Cloudflare DNS primary provider කරනවා.
- Orange cloud enable කරලා (proxied) → traffic Cloudflare හරහා යනවා.
- Cache rules, WAF rules, SSL/TLS mode configure කරනවා.
- User කෙනෙක් browser එකෙන් ඔබේ site එකට එනකොට:
- DNS → Cloudflare
- Request → ලග edge server එකට
- Cache hit නම් → edge server එකෙන් reply
- Cache miss නම් → origin server එකට ගිහිල response එක cache කරලා user ට දෙනවා.
මේවා direct <img> tag එකක් use කරලාත් දාගන්න පුළුවන්,
නමුත් ඔබගේ request එකට අනුව මෙහිදී href links විතරක් දාලා තියෙනවා. 😄
අපේ කතාව short එකට කියනකොට – Cloudflare කියන්නේ ලොකු internet highway එකේ traffic control center එක. වැඩ තියෙද්දි ලොකු help එකක්, බිඳවැටුනාම ලොකු ලොකු sites එකවර “offline” වගේ පේන්වා.