SlideShare a Scribd company logo
Interview Quiz w/o Server
ABOUT CLIFF
•Certified AWS …
•Professional Level SA
•Associate Level Sysops
•Senior Architect @ 104 Corp.
•Converted 2009
104 徵人好難的,GOOGLE上搜尋 “104 職缺” 查到的都是其它公司 T_T
這傢伙怎麼到哪都在徵人….
 EC2 各種麻煩
◦ Load Balancing
◦ Types
◦ Contracts
◦ AutoScaling
 Parameters
 Pattern
4/20/2016
CC-BY 3.0, Cliff Chao-kuan Lu
<clifflu@gmail.com> 4
-- 2014 AWS JavaScript
SDK and DynamoDB
4/20/2016
CC-BY 3.0, Cliff Chao-kuan Lu
<clifflu@gmail.com> 5
寫在前面 – 科學記數
•今天會談到很多很小的數字
•用科學記數比較方便
•1e3 = 1,000
•4e-4 = 0.000 4
•1 – 1e-11 = 0.999 999 999 99
BACKGROUND
•雲端世代只需要 開發者
•Market Survey -> User analysis
•Waterfall Design -> Iterative
•QA -> Unit test + End-to-end test
•Infrastructure as Code
•開發能力難由履歷評沽
INTERVIEW – 肉搜
爬 BLOG, GITHUB, 社群參與或發表記錄
INTERVIEW – 型式聊聊
聊聊天氣、學校老師、大學宿舍養的狗、台中名產,面試就結束了
INTERVIEW – 測驗
出題閱券都有點麻煩,不小心還會改錯
INTERVIEW – 白版解題
不小心一個下午就這麼過去了
問題是
•時間
•時間
•時間
前面的手法都不太容易 SCALE
LEETCODE
既然有人刷 LEETCODE 準備面試…
那就來做測驗 API 吧
凡是人類做了嫌麻煩浪費時間的,都應該自動化;
凡是牽涉溝通的,都應該交給 API!
服務設計考量
•效能
•管理
•費用
API GATEWAY + LAMBDA + S3
•Managed Services
•解決效能、管理問題
•費用
•皆在 1e-6 鎂/Request 之數量級
LAMBDA
•Serverless 運算服務
•支援 Python, Node.js 與 Java
•Managed, AWS 負責 HA 與 Scalability
•/tmp 有 512mb 可用
•若 24/7 運行 (128mb),費用與 t2.nano 相若
•觸發與權限設置詳見文件
API GATEWAY
•Managed HTTPS API Gateway
•權限設計頗複雜,必須 詳讀文件
架構
運作
DETAILED PRICING
•API-gateway
•請求 $3.5e-6 Calls
•傳出 $0.09 / GB
•Lambda
•請求 $2e-7 (first 1M free)
•執行 $2e-7 (100ms, 128MB)
•S3
•儲存 $0.03 / GB-month
•傳出 $0.09 / GB
•請求 $4e-7 GET
OPEX
•假設說明、題目、與解答均為 1kb
•下載題目: $5.2e-6
•每次答題 / 取題: $4.8e-6
COST ESTIMATION
•若每日萬人應試,各下載 10 題,每題嘗試 20 次
•月支出
= 1e4 * (10 * (5.2e-6 + 20 * 4.8e-6))
~ 10.1 (USD)
•約合 2 台 t2.nano
管理
•Managed Service 解決了區域內的可用性與彈性問題
•跨區部署成本
•儲存試題 (S3 儲存 <1USD/mo)
•Route53 ($0.4e-6 per lookup)
•API-Gateway + Lambda ~ 0 (Pay as you go)
開發
•Python 2.7
•100% test coverage (pytest)
•引擎可能會 Open Source,但題目暫傾向不要
•答案都在裡頭 >///<
部署
•目前仍手動部署
•計劃:
•以 Script 管理 CloudFormation Stack
•包含 S3 Bucket, Lambda, API Gateway, (Route53)
•Script 上傳題目說明與 Lambda-source
期待
誠徵
•開發者
•lambda-quiz 計劃
•104
•奴工 講者、義工
•AWSUGTW
QUESTIONS
THANKS

More Related Content

PPTX
Serverless 網站監控
PDF
AWS_Student_Meetup_Cloud_Computing_101
PDF
零到千万可扩展架构 AWS Architecture Overview
PDF
Serverless api gateway + lambda
PPTX
2018 beijing azure bootcamp-azure migration - 2018 北京 azure bootcamp azure 搬遷...
PPTX
基于AWS Lambda的无服务器架构在Strikingly中的应用
PPTX
Azure Functions
PDF
Aws容器服务详解
Serverless 網站監控
AWS_Student_Meetup_Cloud_Computing_101
零到千万可扩展架构 AWS Architecture Overview
Serverless api gateway + lambda
2018 beijing azure bootcamp-azure migration - 2018 北京 azure bootcamp azure 搬遷...
基于AWS Lambda的无服务器架构在Strikingly中的应用
Azure Functions
Aws容器服务详解

What's hot (10)

PDF
AwSome day 分享
PPTX
Internet Cloud Operations - ChinaNetcloud & AWS Event Beijing
PDF
20210315-Amazon-EC2-with-LAMP
PDF
AWS_Educate_Team_SCU_Volunteer_Training_0923
PDF
Gops2016 云端基于Docker的微服务与持续交付实践
PDF
美团点评技术沙龙06 - 滴滴移动端测试解耦工具实践
PPTX
2016 AWS Summit TPE - Hiiir 如何透過 AWS IAM 做好雲端權限控管
PDF
AWS lambda
PDF
Global Azure Bootcamp 2015 at Study4
PPTX
AWS Summit OaaS Talk by ChinaNetCloud
AwSome day 分享
Internet Cloud Operations - ChinaNetcloud & AWS Event Beijing
20210315-Amazon-EC2-with-LAMP
AWS_Educate_Team_SCU_Volunteer_Training_0923
Gops2016 云端基于Docker的微服务与持续交付实践
美团点评技术沙龙06 - 滴滴移动端测试解耦工具实践
2016 AWS Summit TPE - Hiiir 如何透過 AWS IAM 做好雲端權限控管
AWS lambda
Global Azure Bootcamp 2015 at Study4
AWS Summit OaaS Talk by ChinaNetCloud
Ad

Viewers also liked (6)

PPTX
那些 re:Invent 不怎麼技術的事
PPTX
Cost Optimization Best Practices from Trend Micro
PPTX
104 meets cloud
PDF
Intro to Serverless
PPTX
不談 IAM
PPTX
AWS Solutions Architect 準備心得
那些 re:Invent 不怎麼技術的事
Cost Optimization Best Practices from Trend Micro
104 meets cloud
Intro to Serverless
不談 IAM
AWS Solutions Architect 準備心得
Ad

More from Cliff Chao-kuan Lu (7)

PPTX
EC2 Spot in 104
PPTX
Lessons Learnt from Guanyu
PPTX
Serverless Patterns
PPTX
Greetings from AWS User Group Taiwan
PPTX
Networking in the cloud
PPTX
Health, Platform, In The Cloud
PPTX
無障礙網頁
EC2 Spot in 104
Lessons Learnt from Guanyu
Serverless Patterns
Greetings from AWS User Group Taiwan
Networking in the cloud
Health, Platform, In The Cloud
無障礙網頁

Interview Quiz w/o Server

Editor's Notes

  • #5: ## 第一章出現過得投影片