投稿

【セッションメモ】AWS Summit 2022 - Design for Resilience - 如何にしてクラウドアプリケーションの耐久力を高めるか

まえおき 先週開催されたAWS Summitのセッションの中で「Design for Resilience - 如何にしてクラウドアプリケーションの耐久力を高めるか」というセッションがとてもよかった&勉強になった。AWS要素は少なくどのクラウドサービスを利用しても適用できるSREの基礎的な内容で、新人やクラウドをこれから始める人はぜひ1回は聞いてほしい内容だった。 6月30日までセッションの動画アーカイブが公開されるらしく、復習しながらメモを書いてみた。 アーカイブを見たい場合は AWS Summit Japnanページ からログインして、 Design for Resilience - 如何にしてクラウドアプリケーションの耐久力を高めるか(SP-04) というセッションを検索すると出ると思う。 資料も早く公開になったらいいな。 レジリエンスとは 言葉の定義 「抵抗力」、「回復力」、「弾力性」 最近では「困難な状況にも関わらず、しなやかに適応する能力」と言われる 情報システムにおけるレジリエンス 定常的に発生しうる部分的な障害に対する適応力 → HA(High Availability) MTBF(平均故障間隔)・MTTR(平均復旧時間) めったに発生しない広範囲の障害に対する回復力 → DR(Disaster Recovery) RTO(目標復旧時点)・RPO(目標復旧時間) 両方の目的は「アップタイムを長く、ダウンタイムを短く、データ損失は最小限にする」 レジリエンスの重要性 我々の日常生活・ビジネスはシステムに大きく依存している メール、生産、物流、ネットの買い物、銀行のATM... 今後システム依存度はどんどん強くなり、代替手段を戻すことも簡単ではない 障害とは システムが正常な稼働状態を維持できなくなること 障害の原因 → コントロールが効きにくい(すべての原因・変化を事前に想定して取り除くことは難しい) コードや設定、データや状態、コアインフラ、災害シナリオ 障害の影響 → コントロールが効きやすい(

TIL (Today I Learned) - Programmatic programming #9

Today's 3 Line Summary Version Control, Regression Testing, Full Automation Our goal as developers is to delight users. Pragmatic Programmers don’t shirk from responsibility. TIL (Today I Learned) date 2022.04.05 The scope I read today Chapter 9 Pragmatic Projects What you want to remember in the book Topic 49. Pragmatic Teams Teams as a whole should not tolerate broken windows—those small imperfections that no one fixes. Don’t adopt new tech, frameworks, or libraries just because “everyone is doing it,” or based on something you saw at a conference or read online. Good communication is key to avoiding these problems. Automation is an essential component of every project team. Topic 50. Coconuts Don't Cut It The purpose of a software development methodology is to helppeople work together. But as with any goal, the key is to keep aiming in the right direction. Topic 51. Pragmatic Starter Kit And that’s the important part: at the proje

TIL (Today I Learned) - Programmatic programming #8

Today's 3 Line Summary Requirements rarely lie on the surface, so you should try to produce mockups and prototypes for customers or become a client. When faced with an intractable problem, enumerate all the possible avenues you have before you. sometimes it is useful to do something different. The agile team should experiment continuously, and need a good design for easy change. TIL (Today I Learned) date 2022.04.03 The scope I read today Chapter 8 Before the Project What you want to remember in the book Topic 45. The Requirements Pit Requirements rarely lie on the surface. Normally, they’re buried deep beneath layers of assumptions, misconceptions, and politics. Even worse, often they don’t really exist at all. In those cases, Pragmatic Programmers rely on the “is this what you meant?” school of feedback.We produce mockups and prototypes, and let the client play with them. There’s a simple technique for getting inside your clients’ heads that isn’t used

TIL (Today I Learned) - Programmatic programming #7

Today's 3 Line Summary Don't write code by Coincidence. Don’t assume it, prove and try it. Write test code, when you write code. Try to Unit test,Property-Based Test Whenever you create a name, you need to think of the reason. TIL (Today I Learned) date 2022.04.01~02 The scope I read today Chapter 7 While You Are Coding What you want to remember in the book Coding is not mechanical. There are decisions to be made every minute—decisions that require careful thought and judgment if the resulting program is to enjoy a long, accurate, and productive life. Topic 37. Listen to Your Lizard Brain First, stop what you’re doing. Make doodles about the code you’re writing, or explain it to a coworker (preferably one who isn’t a programmer), or to your rubber duck Write “I’m prototyping” on a sticky note, and stick it on the side ofyour screen. Topic 38. Programming by Coincidence As developers, we also work in minefields. There are hundreds of traps

TIL (Today I Learned) - Programmatic programming #6

Today's 3 Line Summary Concurrency is a requirement in our system Try to use transaction,semaphores for concurrency issue Consider to use Actor for concurrency without shared state TIL (Today I Learned) date 2022.03.30 The scope I read today Chapter 6 Concurrency What you want to remember in the book Topic 33. Breaking Temporal Coupling Activity diagrams show the potential areas of concurrency, but have nothing to say about whether these areas are worth exploiting. Remember the distinction: concurrency is a software mechanism, and parallelism is a hardware concern. Topic 34. Shared State Is Incorrect State A semaphore is simply a thing that only one person can own at a time. You can create a semaphore and then use it to control access to some other resource. The current design is poor because it delegates responsibility for protecting access to the pie case to the people who use it. Let’s change it to centralize that control. This caused the buil

TIL (Today I Learned) - Programmatic programming #5

Today's 3 Line Summary Try to decoupling between codes If you need to use external golbal data or static configuration wrap an API Try to write code around events TIL (Today I Learned) date 2022.03.26 The scope I read today Chapter 5 Bend, or Break What you want to remember in the book Topic 28. Decoupling Tell, Don’t Ask https://martinfowler.com/bliki/TellDontAsk.html Try not to have more than one “.” when you access something. There’s a big exception to the one-dot rule: the rule doesn’t apply if the things you’re chaining are really, really unlikely to change. Any mutable external resource is global data.the solution is to make sure you always wrap these resources behind code that you control. If It’s Important Enough to Be Global, Wrap It in an API Topic 29. Juggling the Real World But whatever their source, code that’s crafted around events can be more responsive and better decoupled than its more linear counterpart Top

TIL (Today I Learned) - Programmatic programming #4

Today's 3 Line Summary Don't trust evev yourself. When you think "that could never happen", check it if use resources, check to freed status when finish Always take small, deliberate steps, checking for feedback and adjusting before proceeding. TIL (Today I Learned) date 2022.03.24 The scope I read today Chapter 4 Pragmatic Paranoia What you want to remember in the book But Pragmatic Programmers take this a step further. They don’t trust themselves, either. Topic 23. Design by Contract Remember, if your contract indicates that you’ll acceptanything and promise the world in return, then you’ve got a lotof code to write! Topic 24. Dead Programs Tell No Lies Pragmatic Programmers tell themselves that if there is an error,something very, very bad has happened. A dead program normally does a lot less damage than a crippledone. Topic 25. Assertive Programming Whenever you find yourself thinking “but of course that could never happen,