freecodecamp_freeCodeCamp的服務器到底發生了什么?

freecodecamp

Update at 17:00 California time: We have now fixed most of the problems. We're still working on a few known issues, but /learn is now fully operational.

加利福尼亞時間17:00更新 :我們現在解決了大多數問題。 我們仍在處理一些已知問題,但是/ learn現在可以完全使用。

Here was the culprit - a regular expression-based query that was running against millions of database records every time a someone tried to authenticate.

罪魁禍首是一個基于正則表達式的查詢,每次有人嘗試進行身份驗證時,該查詢都會針對數百萬個數據庫記錄運行。

And here's our cluster's CPU usage before and after we fixed the problem:

這是修復問題前后我們群集的CPU使用率:

This may seem obvious, but it took Mrugesh 3 days of detective work to identify the bottleneck.

這看起來似乎很明顯,但是Mrugesh花費了 3天的偵探工作來確定瓶頸。

We've concluded that we could have spotted this earlier with a $30 per month tool, so we broke down and bought it for future usage.

我們得出的結論是,我們可以使用每月30美元的工具早些時候發現它,因此我們拋售了它,以備將來使用。

What follows is a more in-depth explanation of what happened.

接下來是對發生的事情的更深入的解釋。

簡而言之: (In short:)

  • On Tuesday we rolled out a ton of new code. Including code that allow us to continuously deliver new features and bug fixes.

    在星期二,我們推出了許多新代碼。 包括允許我們不斷提供新功能和錯誤修復的代碼。
  • We thought we'd load-tested our new code enough. But it wasn't high-performance enough for the sudden weight of 2,000 concurrent users.

    我們認為我們已經對新代碼進行了足夠的負載測試。 但是對于2000個并發用戶的突然增加,它的性能還不夠。
  • /forum and /news worked fine, but the sign-in functionality on /learn was unreliable for 3 days.

    / forum和/ news可以正常工作,但是/ learn上的登錄功能在3天內不可靠。

好。 現在更多細節。 (OK. Now some more detail.)

For the past 10 months or so, we've been accumulating new features, bug fixes, and curriculum improvements.

在過去的10個月左右,我們一直在積累新功能,錯誤修復和課程改進。

We've continued to merge improvements into our Master branch and deploy them to our beta server at www.freecodecamp.dev.

我們繼續將改進合并到我們的Master分支中,并將其部署到我們的beta服務器,網址為www.freecodecamp.dev。

For the past 2 months, lots of contributors have people using this beta version of freeCodeCamp.

在過去的兩個月中,許多貢獻者都在使用此版本的freeCodeCamp的人們。

And in celebration of freeCodeCamp's 5th anniversary this month, we wanted to go ahead and push all of these improvements into production at www.freecodecamp.org.

為了慶祝本月freeCodeCamp成立5周年,我們希望繼續前進,并在www.freecodecamp.org上將所有這些改進投入生產。

On Tuesday, we went down for what we thought would be 3 minutes of planned maintenance. We did a final testing run, took a database backup, sent out a "we'll be right back" tweet, and pushed 10 months worth of code live all at once.

在星期二,我們進行了3分鐘的計劃維護。 我們進行了最后的測試,備份了數據庫,發出了一條“我們馬上回來”的推文,并一次發布了10個月的代碼。

But Murphy's Law was waiting behind the corner to club us in the knees. And as more and more traffic piled on, our servers buckled.

但是墨菲定律在拐角處等著我們。 隨著越來越多的流量堆積,我們的服務器崩潰了。

We were able to get /forum and /news back up almost immediately. But /learn required authentication, and hit some additional API endpoints and servers. So for 3 days we scrambled to get it to work.

我們幾乎可以立即獲得/ forum和/ news的備份。 但是/ learn需要身份驗證,并需要使用其他一些API端點和服務器。 因此,我們花了3天時間努力使它正常工作。

It turned out our new code wasn't as high-performance as we'd thought, and we were hitting our API servers a lot more than necessary.

事實證明,我們的新代碼不如我們想像的那樣具有高性能,并且我們對API服務器的攻擊遠遠超出了必要。

So we identified parts of the codebase that were making unnecessary API calls and refactored them, while also juggling DevOps challenges.

因此,我們確定了代碼庫中進行不必要的API調用的部分并對其進行了重構,同時還應對了DevOps的挑戰。

為什么會這樣呢? 真? (Why did this happen, though? Really?)

At the end of the day, this outage was my fault.

歸根結底,這次故障是我的錯。

Here's why.

這就是為什么。

Our total budget for 2019 is only about $300,000. And yet we're helping millions of people learn to code every month.

我們2019年的總預算僅為300,000美元。 但是,我們每個月都在幫助數百萬人學習編碼。

We now get more traffic than other learn-to-code sites like Udacity and Codecademy. We get even more traffic than mainstream news websites like TechCrunch.

現在,與Udacity和Codecademy等其他學習型代碼站點相比,我們獲得的流量更多。 我們獲得的流量甚至超過TechCrunch等主流新聞網站。

When you operate at such extreme scale with such a paltry budget, you end up clipping coupons.

當您以如此微不足道的預算在如此極端的規模上運作時,您最終會得到優惠券。

Those giant servers that could give you comfortable overhead for spikes? Too expensive.

那些巨大的服務器可以為您帶來峰值的開銷? 太貴了。

Those fancy DevOps services that identify choke points? Too expensive.

那些可以識別阻塞點的高級DevOps服務? 太貴了

Our team of 5 engineers ends up doing the work of 10.

我們由5名工程師組成的團隊最終完成了10名工作。

My point is - it's my fault freeCodeCamp only has $300,000 to work with this year. To put that number perspective, I know individual developers in San Francisco whose salary is larger than $300,000.

我的意思是-這是我的錯freeCodeCamp今年只有30萬美元可以使用。 從數字角度來看,我知道舊金山的個人開發人員的薪水超過300,000美元。

There's nothing wrong with having a big salary. San Francisco is an expensive city.

高薪沒有錯。 舊金山是一個昂貴的城市。

But there is a problem when freeCodeCamp - one of the largest education sites on the internet - is trying to operate on such a comically tiny budget.

但是當freeCodeCamp(互聯網上最大的教育網站之一)試圖以如此可笑的小預算運作時,就會出現問題。

Again, it's my fault.

再次,這是我的錯。

I'm inexperienced at grassroots fundraising.

我對基層籌款沒有經驗。

I'm still learning how to raise awareness of all the work we're doing for the community.

我仍在學習如何提高對我們為社區所做的所有工作的認識。

I am shy when it comes to asking you all to donate money to fund that work.

當我要求大家捐款以資助這項工作時,我很害羞。

So I am going to make a concerted effort to get better, and to increase our budget.

因此,我將共同努力以求更好,并增加我們的預算。

I don't want to run ads.

我不想投放廣告。

I don't want to say "freeCodeCamp, brought to you by the Acme Corporation."

我不想說“由Acme Corporation帶給您的freeCodeCamp”。

And of course, I don't ever want to charge learners for our learning resources.

當然,我絕對不想向學習者收取我們的學習資源。

So far, we haven't had to do any of these things.

到目前為止,我們還沒有做任何這些事情。

But this really only leaves us with one source for funding. We, the people.

但這實際上只給我們提供了一種資金來源。 我們人類。

freeCodeCamp is a grass-roots donor-supported nonprofit. We just need to get better at asking people for money.

freeCodeCamp是由基層捐助者支持的非營利組織。 我們只需要變得更好就可以向人們索要錢。

We are heading into the holiday season. This is when about 80% of the year's charitable gifts are made here in the US.

我們即將進入假期。 這是當年大約80%的慈善禮物是在美國制造的。

So I'm going to stay focused on this. I will document what I learn as I experiment. And I will eventually create a fundraising handbook for other grass-roots donor-supported nonprofits based on what I learn.

所以我將繼續專注于此。 我將記錄我在實驗中學到的東西。 最后,我將根據我所學的知識,為其他基層捐助者支持的非營利組織編寫籌款手冊。

This is a bit embarrassing, but our current donate page is down today because our authentication is still wonky.

這有點令人尷尬,但是由于我們的身份驗證仍然很糟糕,我們當前的捐贈頁面今天已關閉。

So I've set up a PayPal page where you can make tax-deductible one-time donations to freeCodeCamp.

因此,我建立了一個PayPal頁面,您可以在其中一次性向freeCodeCamp捐款進行免稅捐款 。

We still welcome your monthly support of freeCodeCamp. Your $5 donations each month are what makes freeCodeCamp possible, and what gives us the stable budget to plan ahead.

我們仍然歡迎您每月對freeCodeCamp的支持。 您每個月的$ 5捐款使freeCodeCamp成為可能,并使我們有穩定的預算來提前進行計劃。

But if you do have a some extra cash on hand for a one-time donation, it would be a huge help.

但是,如果您確實有一筆額外的現金可用于一次性捐贈, 那將是巨大的幫助 。

這是我對您的承諾: (Here is my commitment to you:)

freeCodeCamp will stay free.

freeCodeCamp將保持免費。

freeCodeCamp will not run ads.

freeCodeCamp將不會投放廣告。

And when we ask you to donate, we will do so tastefully and honestly. We won't use pathos, or make those "we're going bankrupt unless you donate right now" type claims that some other nonprofits resort to.

當我們要求您捐贈時,我們將做到高雅而誠實。 我們不會使用悲哀,也不會讓那些“除非您現在就捐贈,否則我們將破產”的類型聲稱其他一些非營利組織會采取這種行動。

Because the reality is this: Even if freeCodeCamp completely ran out of money, we would still keep going.

因為現實是這樣的:即使freeCodeCamp完全沒錢了,我們仍然會繼續前進。

Yes, we would have to lay everyone off, including myself. But I would go get some other job and pay for the servers myself.

是的,我們必須解雇所有人,包括我自己。 但是我會去找其他工作,自己支付服務器費用。

Because freeCodeCamp is clearly something that the world needs.

因為freeCodeCamp顯然是世界需要的東西。

I've poured 5 years of my life into this community. I've poured $150,000 of my personal savings from my teaching career into freeCodeCamp.

我已經為這個社區投入了5年的生命。 我從我的教學生涯中將我的個人儲蓄中的$ 150,000投入了freeCodeCamp。

freeCodeCamp will never die.

freeCodeCamp將永生。

It's just a question of how vibrantly freeCodeCamp can live.

這只是freeCodeCamp可以活得多么生動的問題。

Again, if you have some cash to spare, we are a highly efficient nonprofit, and we will put it to effective use. Donate here.

同樣,如果您有剩余的現金,我們將是一個高效的非營利組織,我們將充分利用它。 在這里捐款 。

And thank you again for your patience with the outage on /learn.

再次感謝您對/ learn中斷的耐心等待。

Once we've fixed all this, I will let you all know, and I'll publish my 5th anniversary article that details all the big improvements we have for our 5th anniversary.

解決所有問題后,我將通知大家,我將發表5周年紀念文章,其中詳細介紹了5周年紀念日我們取得的所有重大改進。

Happy coding.

快樂的編碼。

翻譯自: https://www.freecodecamp.org/news/freecodecamp-servers-update-october-2019/

freecodecamp

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/391247.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/391247.shtml
英文地址,請注明出處:http://en.pswp.cn/news/391247.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

為什么Linux下的環境變量要用大寫而不是小寫

境變量的名稱通常用大寫字母來定義。實際上用小寫字母來定義環境變量也不會報錯,只是習慣上都是用大寫字母來表示的。 首先說明一下,在Windows下是不區分大小寫的,所以在Windows下怎么寫都能獲取到值。 而Linux下不同,區分大小寫&…

python:連接Oracle數據庫后控制臺打印中文為??

打印查詢結果,中文顯示為了??? [(72H FCR, 2.0), (?????, 8.0)] E:\Python35\Lib\site-packages中新增文件: sitecustomize.py import os os.environ[NLS_LANG] SIMPLIFIED CHINESE_CHINA.UTF8 轉載于:https://w…

時間序列預測 時間因果建模_時間序列建模以預測投資基金的回報

時間序列預測 時間因果建模Time series analysis, discussed ARIMA, auto ARIMA, auto correlation (ACF), partial auto correlation (PACF), stationarity and differencing.時間序列分析,討論了ARIMA,自動ARIMA,自動相關(ACF),…

初探Golang(4)-map和流程控制語句

1.map map 是引用類型的,如果聲明沒有初始化值,默認是nil。空的切片是可以直接使用的,因為他有對應的底層數組,空的map不能直接使用。需要先make之后才能使用。 //1, 聲明map 默認值是nil var m1 map[key_data_type]value_data_type 聲明 …

網絡傳輸之TCP/IP協議族

我們現實網絡無處不在,我們被龐大的虛擬網絡包圍,但我們卻對它是怎樣把我們的信息傳遞并實現通信的,我們并沒有了解過,那么當我們在瀏覽器中出入一段地址,按下回車這背后都會發生什么? 比如說一般場景下&am…

(58)PHP開發

LAMP0、使用include和require命令來包含外部PHP文件。使用include_once命令,但是include和include_once命令相比的不足就是這兩個命令并不關心請求的文件是否實際存在,如果不存在,PHP解釋器就會直接忽略這個命令并且顯示一個錯誤消息&#xf…

css flexbox模型_如何將Flexbox后備添加到CSS網格

css flexbox模型I shared how to build a calendar with CSS Grid in the previous article. Today, I want to share how to build a Flexbox fallback for the same calendar. 在上一篇文章中,我分享了如何使用CSS Grid構建日歷。 今天,我想分享如何為…

python:封裝連接數據庫方法

config.py # 數據庫測試環境 name *** password ****** host_port_sid 10.**.*.**:1521/bidbuat OracleOperation.py import cx_Oracle import configclass OracleOperation(object):# 執行下面的execute_sql方法時會自動執行該初始化方法進行連接數據庫def __init__(self):…

貝塞爾修正_貝塞爾修正背后的推理:n-1

貝塞爾修正A standard deviation seems like a simple enough concept. It’s a measure of dispersion of data, and is the root of the summed differences between the mean and its data points, divided by the number of data points…minus one to correct for bias.標…

RESET MASTER和RESET SLAVE使用場景和說明【轉】

【前言】在配置主從的時候經常會用到這兩個語句,剛開始的時候還不清楚這兩個語句的使用特性和使用場景。 經過測試整理了以下文檔,希望能對大家有所幫助; 【一】RESET MASTER參數 功能說明:刪除所有的binglog日志文件,…

Kubernetes 入門(1)基本概念

1. Kubernetes簡介 作為一個目前在生產環境已經廣泛使用的開源項目 Kubernetes 被定義成一個用于自動化部署、擴容和管理容器應用的開源系統;它將一個分布式軟件的一組容器打包成一個個更容易管理和發現的邏輯單元。 Kubernetes 是希臘語『舵手』的意思&#xff0…

Python程序互斥體

Python程序互斥體 有時候我們需要程序只運行一個實例,在windows平臺下我們可以很簡單的用mutex實現這個目的。 ??在開始時,程序創建了一個命名的mutex,這個mutex可以被其他進程檢測到。 這樣如果程序已經啟動,再次運行時的進程就…

890

890 轉載于:https://www.cnblogs.com/Forever77/p/11528605.html

android 西班牙_分析西班牙足球聯賽(西甲)

android 西班牙The Spanish football league commonly known as La Liga is the first national football league in Spain, being one of the most popular professional sports leagues in the world. It was founded in 1929 and has been held every year since then with …

Goalng軟件包推薦

2019獨角獸企業重金招聘Python工程師標準>>> 前言 哈嘍大家好呀! 馬上要迎來狗年了大家是不是已經懷著過年的心情了呢? 今天筆者給大家帶來了一份禮物, Goalng的軟件包推薦, 主要總結了一下在go語言中大家開源的優秀的軟件, 大家了解之后在后續使用過程有遇到如下軟…

Kubernetes 入門(2)基本組件

1. C/S架構 Kubernetes 遵循非常傳統的客戶端服務端架構,客戶端通過 RESTful 接口或者直接使用 kubectl 與 Kubernetes 集群進行通信,這兩者在實際上并沒有太多的區別,后者也只是對 Kubernetes 提供的 RESTful API 進行封裝并提供出來。 左側…

caioj1522: [NOIP提高組2005]過河

狀態壓縮的經典題。 按照一般做法,DP一維時間O(n),顯然跑不過。考慮到石子較少,實際上有很長一段是一定可以跳到的,設兩個石頭分別在i點和j點,跳躍的路程為S到T。那么從i點可以跳到iS到iT。從j-T到j-S可以跳到J。顯然當…

Dev控件使用CheckedListBoxControl獲取items.count為0 的解決方法

CheckedListBoxControl,我使用DataSource屬性,給其綁定了一個List對象。界面顯示都挺正常的,當若干個項的復選框被選中的后,它的checkedListBoxControl1.CheckedItems也是正常的。 唯獨的問題是在代碼中得到的checkedListBoxContr…

如何啟動軟件YouTube頻道

Hi, I’m Beau and I run the freeCodeCamp.org YouTube channel. 嗨,我是Beau,我運行了freeCodeCamp.org YouTube頻道 。 For the first few years of our channel’s life, we had less than 100,000 subscribers. When we published new videos, we …

【powerdesign】從mysql數據庫導出到powerdesign,生成數據字典

使用版本powerdesign16.5,mysql 5.5,windows 64 步驟: 1.下載mysql驅動【注意 32和64的驅動都下載下來,具體原因查看第三步 依舊會報錯處】 下載地址:https://dev.mysql.com/downloads/connector/odbc/5.3.html 請下…