Muutke küpsiste eelistusi

Learning Serverless: Design, Develop, and Deploy with Confidence [Pehme köide]

  • Formaat: Paperback / softback, 222 pages, kõrgus x laius: 233x178 mm
  • Ilmumisaeg: 30-Nov-2020
  • Kirjastus: O'Reilly Media
  • ISBN-10: 1492057010
  • ISBN-13: 9781492057017
  • Pehme köide
  • Hind: 63,19 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Tavahind: 74,34 €
  • Säästad 15%
  • Raamatu kohalejõudmiseks kirjastusest kulub orienteeruvalt 2-4 nädalat
  • Kogus:
  • Lisa ostukorvi
  • Tasuta tarne
  • Tellimisaeg 2-4 nädalat
  • Lisa soovinimekirja
  • Formaat: Paperback / softback, 222 pages, kõrgus x laius: 233x178 mm
  • Ilmumisaeg: 30-Nov-2020
  • Kirjastus: O'Reilly Media
  • ISBN-10: 1492057010
  • ISBN-13: 9781492057017

Whether your company is considering serverless computing or has already made the decision to adopt this model, this practical book is for you. Author Jason Katzer shows early- and mid-career developers what&;s required to build and ship maintainable and scalable services using this model.

With this book, you&;ll learn how to build a modern production system in the cloud, viewed through the lens of serverless computing. You&;ll discover how serverless can free you from the tedious task of setting up and maintaining systems in production. You&;ll also explore new ways to level up your career and design, develop, and deploy with confidence.

In three parts, this book includes:

  • The Path to Production: Examine the ins and outs of distributed systems, microservices, interfaces, and serverless architecture and patterns
  • The Tools: Dive into monitoring, observability and alerting, logging, pipelines, automation, and deployment
  • Concepts: Learn how to design security and privacy, how to manage quality through testing and staging, and how to plan for failure
Preface xv
Introduction to Serverless xxi
Part I The Path to Production
1 Distributed Systems
1(12)
What Is a Distributed System?
1(2)
Why Do We Want a Distributed System?
3(1)
The Harsh Realities of Distributed Systems
3(5)
The Physical World
4(1)
Missing Messages
4(1)
Unreliable Clocks
5(1)
Cascading Failures
6(1)
Unexpected Ordering
7(1)
Idempotency
7(1)
What Am I Responsible For?
8(1)
What Do You Need to Consider When Designing a Distributed System?
8(3)
Loose Coupling (or Decoupling)
9(1)
Fault Tolerance
9(1)
Generating Unique (Primary) Keys
10(1)
Planning for Idempotency
10(1)
Two-Phase Changes
11(1)
Further Reading
11(1)
Conclusion
12(1)
2 Microservices
13(12)
Why Do You Want to Use Microservices?
14(2)
Improved Developer Velocity
14(1)
Increased Developer Freedom
15(1)
Issues with Microservices
16(2)
Increased Complexity
16(1)
Proper DevOps Practices and Resources Needed
17(1)
Challenges with Local Development and Testing
17(1)
How Do You Use Microservices Effectively?
18(2)
Consistent Interfaces
18(1)
Loosely Coupled
19(1)
How Micro Is a Microservice?
20(1)
Choosing Between Monoliths and Microservices
21(3)
When Should You Use a Monolith?
21(3)
When Do You Want to Use Microservices?
24(1)
Conclusion
24(1)
3 Serverless Architecture and Patterns
25(20)
The Role of an Architect
26(1)
What Do You Need to Know to Be an Architect?
27(1)
Making Decisions
27(4)
What Kinds of Decisions?
28(1)
Documenting Your Decisions
28(1)
How Do We Make Decisions?
29(1)
When Do We Make Decisions?
30(1)
Cloud Provider Components
31(6)
Streams
31(1)
Queues
31(1)
Buckets
32(1)
Compute
33(1)
Datastores
33(1)
Identity Service
34(1)
API Gateways
34(1)
GraphQL
35(1)
Networking
35(1)
State Machines
35(1)
Logging
36(1)
Monitoring and Alerting
36(1)
Events from Your Cloud Provider
37(1)
Periodic Invocations
37(1)
Patterns
38(6)
Example 1 Serverless Monolith
38(1)
Example 2 Incoming Webhook
39(1)
Example 3 Using Your Cloud Provider for User Authentication
40(1)
Example 4 Generic Background Task Pattern
41(1)
Example 5 Streaming Extract, Transform, Load
41(1)
Example 6 Create Your Own Polling Integration
41(1)
Example 7 Processing Files and Images
42(1)
Example 8 Migration Service Pattern
43(1)
Example 9 Fanning Out
43(1)
Conclusion
44(1)
4 Interfaces
45(18)
Interfaces: Some Assembly Required
46(1)
The Message
46(1)
The Protocol
46(1)
The Contract
46(1)
Serverless Interfaces
47(1)
Automatic Retries and Dead Letter Queues
47(1)
Finite Versus Infinite Scale
48(1)
Designing Your Interfaces
48(4)
Messages/Payloads
49(1)
Sessions and Users/Auth
50(1)
Avoid Unbounded Requests
50(1)
Interface Versus Implementation
51(1)
Lines with Logic
52(1)
Designing the Unhappy Path
52(3)
Validating Input
53(1)
Failures
53(2)
Strategies for Integrating with Other Services
55(4)
Time-Outs
55(1)
Retries
56(1)
Exponential Backoff
57(1)
Webhooks
57(1)
Evaluating External Services
58(1)
Rate Limits
58(1)
Conclusion
59(4)
Part II The Tools
5 The Serverless Framework
63(22)
Why Use the Serverless Framework?
64(1)
When the Serverless Framework Isn't for You
65(2)
AWS Is the Only First-Class Citizen
66(1)
AWS CloudFormation Is Not Perfect
66(1)
Relying on Strangers for Your Infrastructure
66(1)
What to Know Before You Start
67(5)
YAML
68(1)
Node.js
69(1)
Cloud Resources and Permissions
69(2)
Infrastructure Templates
71(1)
Production Secrets
71(1)
.Gitignore
71(1)
The Components of a serverless.yml File
72(6)
Provider
72(2)
Environment
74(1)
Functions
74(1)
Resources
75(1)
Package
75(1)
Plug-Ins
76(1)
Custom
77(1)
Namespacing for Sanity and Security
77(1)
Using the serverless Command
78(4)
Installing Serverless
78(1)
Setting Up Serverless with Credentials
79(1)
Pulling in Templates Using serverless install
79(1)
Inspecting the Package of Our Sample Project (What's Inside)
80(1)
Deployment
80(1)
Invoking the Function, and Viewing Logs
81(1)
Rollbacks
81(1)
Destroying the Service
81(1)
Deployment Packages
82(1)
Real-World serverless.yml
82(2)
Setting Environment Variables
83(1)
Modify Permissions
83(1)
Conclusion
84(1)
6 Monitoring, Observability, and Alerting
85(16)
What Is Monitoring?
85(2)
Why Do We Need Monitoring?
86(1)
How Does Monitoring Relate to Serverless?
86(1)
The On-Ramp to Automation
87(1)
What Are My Options?
87(2)
Hosted SaaS Offerings
88(1)
Self-Hosted and Open Source
88(1)
Components of Monitoring
89(7)
Metrics
89(4)
Charts/Graphs
93(1)
Dashboards
94(1)
Alerts/Alarms
95(1)
A Selection of Advanced Practices
96(4)
Heartbeats
96(1)
Smoke Testing and/or Canaries
97(1)
The Most Important Metric in the World
98(1)
Avoiding Vendor Lock-In
99(1)
Cleaning Up Metrics and Alerts over Time
100(1)
Conclusion
100(1)
7 Logging
101(14)
What Does It Mean to Log?
102(1)
Why Log?
103(1)
When to Rely on Logs Instead of Metrics
104(1)
What Should You Log?
104(2)
What Shouldn't You Log?
106(1)
How Does Logging Work?
107(4)
Ensuring Your Logs Scale
108(1)
Structured Logging
109(1)
More Effective Debugging with Logs
109(1)
Searching Logs
110(1)
Exception Logging (Sentry)
110(1)
Collecting Other Logs
111(1)
Compliance
111(1)
Distributed Tracing
112(1)
Encrypting Logs for Privacy and Compliance
112(2)
Encrypt Only the Values of Sensitive Fields
113(1)
Encrypt the Entire Log Statement
113(1)
Conclusion
114(1)
8 Changes, Automation, and Deployment Pipelines
115(18)
Dealing with Change
116(1)
The Role of Automation
116(2)
What Do We Automate?
117(1)
Getting Your Code Ready for Production
118(1)
Infrastructure as Code
119(1)
Database Changes (Migrations)
120(1)
Configuration Management
121(1)
What Is a Pipeline?
122(1)
Decisions to Make Regarding Your Pipeline
123(1)
Canaries and Blue/Green Deployments
123(2)
Pipeline Permissions
124(1)
Why Do You Need a Pipeline?
125(1)
Key Phases of a Deployment Pipeline
125(4)
Step 1 Enforce Standards
126(1)
Step 2 Build and Package
126(1)
Step 3 Test
127(1)
Step 4 Publish the Artifact
127(1)
Step 5 Deploy to the Target Environment
128(1)
Step 6 Validate Deployment
128(1)
Step 7 Roll Back if Necessary (and Possible)
128(1)
Handling Pipeline Failures
129(1)
Conclusion
130(3)
Part III Concepts
9 Security, Permissions, and Privacy
133(20)
Everyone Is Responsible, but You Are Especially Responsible
134(1)
Prepare to Be Hacked
135(4)
Understanding Your Threats and Your Attackers
136(1)
Design for Security
137(2)
Limit, Track, and Review All Secrets and Access
139(1)
Be Ready to Roll
140(5)
Defense in Depth
141(1)
Limit Blast Radius
142(1)
Trust but Verify
142(3)
Validate All User Input and Double-Check Those Settings
145(6)
Monitoring Your System for Anomalies
146(1)
Test Your Security
146(1)
Select Dependencies Carefully and Keep Your Software Up to Date
147(2)
Prioritize Privacy for Your Data and Your Customers' Data
149(1)
Don't Mess with Production
149(2)
Keep Your Machine Secure
151(1)
Keep Learning
151(1)
Conclusion
151(2)
10 Quality, Testing, and Staging
153(16)
The Role of Code Quality
154(3)
Code Style
155(1)
Linting
156(1)
Testing
157(7)
What to Test and What Not to Test
158(1)
Types of Testing
158(5)
Code Coverage
163(1)
Power Up Your Testing
164(1)
Staging
164(4)
Conclusion
168(1)
11 Planning for Failure
169(8)
Introduction: Understand It, Even if You Don't Manage It
169(1)
Identify Risks
170(2)
Exercise: Finding Your Failure Points
171(1)
Be Prepared
172(1)
Making a Runbook
173(1)
Planning for Outages
174(1)
On-Call/Escalation Plan
175(1)
Monitor Your Cloud Provider
175(1)
Know Your (Service) Limits
176(1)
Conclusion
176(1)
12 Conclusion
177(6)
Deciding among Vendors
178(1)
Community
179(1)
Gather the Advice of Others
179(1)
What to Do When You Get Stuck
180(1)
Taking the Next Step in Your Career
180(3)
Index 183
Jason Katzer is from Los Angeles and has lived all over the Bay Area before moving to New York. Jason loves to save people time and money at Capital One as Director of Software Engineering. Prior to joining Capital One, he was a Director of Engineering at Blink Health. He is a serial entrepreneur who has been involved with and started many new ventures. The industries he has worked in range from Health Care, Consumer Tech, Fitness, Sales, Finance and Telecom, but he has one real focus: building quality software. He is a passionate teacher (MakeSchool), as well as a lifelong learner.