自小就聽「書到用時方恨少」一句說話,基建也是一樣,到真正有需要時,就會發現基建有多重要,也可看到現有基建有多不濟(巴菲特:水退就知誰在裸泳)。
就以口罩為例,自從疫情開始,世界各地也出現口罩搶購潮,香港也毫不例外,甚至出現更不理性的狀況。
最初的幾日,各大商店一宣佈口罩開賣,那怕是只有一千幾百個,也吸引大批市民排隊。群眾排隊買口罩,不但對防疫沒有幫助,更加劇群眾接觸互相傳染的機會。沒多久,不少網購平台也改善過來,開發提供網上訂購,即使老年人未能學會使用,至少後生一輩不用一齊去排隊,也有助減少市民聚集。
不過網上平台也遇到不少問題,其中最大一個就是短時間內流量太多導致server 負荷過重,即使較大的平台如HKTVMall 及屈臣氏也不能幸免,更莫說一些有心人仕自建平台銷售,其server 更是癱瘓得慘不忍睹,如何解決短時間流量大幅增加,個人認為「雲端運算」是其中最好的一個辦法。
以網購平台為例,一般網購平台在建立業務時,都會按平均或高峰時間所需用量,估算購置的硬件,最簡單是 CPU 及 storage,以配合業務需要。面對疫情最大的困難是,開賣口罩的數十分鐘內(幾分鐘?),會出現突然巨額膨脹的伺服器訪問需求,導致負荷過重不能處理。當然簡單一句話,添置硬件不就解決問題?但網購平台平日的生意一般也不到這個需要,總不成為了一個星期幾十分鐘的業務而大額添置硬件,「雲端運算」正是為解決這個問題而出現。
所謂「雲端運算」,簡單來說就是把大量計算機器放在一齊,由雲端運算服務公司提供基建,整合這些機器的computing power 及storage,目標達致資源共享,隨需提供。Amazon AWS 以"Elasticity" 一字來形容這個能力。其最大的作用,在於公司可以在業務有突如其來的需要時,立即配置足夠的資源支持業務,毋須添置硬件,提升時無縫交接。
用「雲」的概念,意義是公司不需要在開展業務估算需求而購置硬件,因為原則上是可以在實則有需要時加添,費用也是按實則用量而定,這對很多start-up 公司是一大優勢,因為start-up 一開始要估算業務量也有一定困難,而且用「雲」亦減省了一次性投資(也所謂入場最低消費)。
不過用「雲」也有它的缺點,首先是價錢方面。雖然「雲」的計費一般也比較 transparent, 也是按用量而定,但實際計算下來,平均CPU 及storage 也會比自家添置貴,尤其業務相對穩定易估算的情況下,現有方案應該會較平。而且「雲」雖然不是真的放在雲上,也跟網絡供應商有實際的距離,所以也要考慮應用地點和網速,選擇server zone 時也要考慮應用地點,如果有大部份用量是local 的話也真的要想清楚是否用「雲」。
不過整體來說「雲」的優點還是比缺點多,也是長遠來說比較環保的host server 方法。按現時不少公司使用實體硬件的做法,為免經常出現瓶頸,實際上大部份的計算資源也是閒置浪費的,如果都是要用同等分量的資源去製造這些硬件,選擇「雲」則可以把閒置資源調配給其它有需要的地方,達致economies of scale, 減少浪費,網上資源由雲服務公司提供就似乎更加合理。最近更得知Amazon 已經在歐洲試行將其infrastructure 100%改用再生能源,這更加是對環保一大好消息。另外「雲」本來就包含了HA的理念,也可以支援定時備份,對數據就更有保障。
目前除了Amazon 的AWS 有先發優勢,在2006 年已經開始「雲」業務,其它巨頭也開始投入大量資源搶佔板塊,例如Google, Microsoft, 連一向做開硬件的IBM 也投入,中國方面也有Alibaba, Huawei 等加入戰團,服務除了是最直接的web hosting,其它雲端運算還包括Data analytics, AI, Machine Learning, Robotics, IoT 等,Client side 也包括virtual PC等。
可以說「雲」會是未來一段頗長日子的一大趨勢,試想像如果現時IBM, HP或Dell 的辦公室硬件服務,都將由「雲 」提供取代,這是多麼大的一個機遇。
現時AWS 和Google Cloud都有提供網上課程,讓有興趣的IT 同行免費學習其平台功能,AWS還有一年免費使用基礎服務的計劃可以試玩,絕對值得花時間去深入鑽研。
I am working in company’s cloud team now. We have private cloud which is on-premise and public cloud on Azure. The experience is that’s very tired to self manage the hardware infrastructure including network, security, resilient, etc. So public cloud is a very good choice if the company is open mind enough to put sensitive data outside their data center.
ReplyDeleteFor cloud computing, I think most of people imagine that application can scale up easily with the public cloud elastic hardware. That’s maybe true in some of the cases. For enterprise scale system, it may not be that easy just to replatform the applications on cloud. There must be many integrations with other domestic system which still sit on premise. And most importantly, they may be monolith and not cloud native. Which means that the application may be not scalable, or still bottleneck at database which cloud infrastructure is not going to rescue. To fully enjoy the benefit bring by cloud, application need to be refactored in Microservices architecture which fulfill 12-factors. The famous cloud platforms such as K8S and PCF are also designed for cloud native applications. I think many company still forget to put effort in this part now, which is very important!
Totally agree. To be able to scale out/in effectively, the service instance shall first be light-weight enough. However, over the past 50 or 60 years of system development history, we have evolved the pattern of developing all-in-one platform in many domain, and nowadays most systems cannot be easily broken down in simple pieces. I think a fundamental shift of development pattern is required for architecting in microservices, but can expect this shift will be another long journey that may not be widely seen in next 5-10 years.
ReplyDeleteAnd regarding the choice of public cloud or private cloud, I think most people have a false illusion that public cloud is not safe, while private cloud provides the great firewall for data protection. However, to embrace the benefit of public cloud infrastructure, a company shall have the abundant human resources in network and security, which in most cases these resources are much more rare when comparing with application developers. This would result in a slow pace moving to public cloud.