ebook img

Google Cloud Platform in Action PDF

632 Pages·2018·25.15 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Google Cloud Platform in Action

JJ Geewax Foreword by Urs Hölzle M A N N I N G Google Cloud Platform in Action Google Cloud Platform in Action JJ GEEWAX MANNING SHELTER ISLAND For online information and ordering of this and other Manning books, please visit www.manning.com. The publisher offers discounts on this book when ordered in quantity. For more information, please contact Special Sales Department Manning Publications Co. 20 Baldwin Road PO Box 761 Shelter Island, NY 11964 Email: [email protected] ©2018 by Manning Publications Co. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps. Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end. Recognizing also our responsibility to conserve the resources of our planet, Manning books are printed on paper that is at least 15 percent recycled and processed without the use of elemental chlorine. The photographs in this book are reproduced under a Creative Commons license. Manning Publications Co. Development editor: Christina Taylor 20 Baldwin Road Review editor: Aleks Dragosavljevic PO Box 761 Technical development editor: Francesco Bianchi Shelter Island, NY 11964 Project manager: Kevin Sullivan Copy editors: Pamela Hunt and Carl Quesnel Proofreaders: Melody Dolab and Alyson Brener Technical proofreader: Romin Irani Typesetter: Dennis Dalinnik Illustrator: Jason Alexander Cover designer: Marija Tudor ISBN: 9781617293528 Printed in the United States of America 1 2 3 4 5 6 7 8 9 10 – DP – 23 22 21 20 19 18 brief contents PART 1 GETTING STARTED........................................................1 1 ■ What is “cloud”? 3 2 ■ Trying it out: deploying WordPress on Google Cloud 24 3 ■ The cloud data center 38 PART 2 STORAGE....................................................................51 4 ■ Cloud SQL: managed relational storage 53 5 ■ Cloud Datastore: document storage 89 6 ■ Cloud Spanner: large-scale SQL 117 7 ■ Cloud Bigtable: large-scale structured data 158 8 ■ Cloud Storage: object storage 199 PART 3 COMPUTING .............................................................241 9 ■ Compute Engine: virtual machines 243 10 ■ Kubernetes Engine: managed Kubernetes clusters 306 11 ■ App Engine: fully managed applications 337 12 ■ Cloud Functions: serverless applications 385 13 ■ Cloud DNS: managed DNS hosting 406 v vi BRIEF CONTENTS PART 4 MACHINE LEARNING..................................................425 14 ■ Cloud Vision: image recognition 427 15 ■ Cloud Natural Language: text analysis 446 16 ■ Cloud Speech: audio-to-text conversion 463 17 ■ Cloud Translation: multilanguage machine translation 473 18 ■ Cloud Machine Learning Engine: managed machine learning 485 PART 5 DATA PROCESSING AND ANALYTICS.............................519 19 ■ BigQuery: highly scalable data warehouse 521 20 ■ Cloud Dataflow: large-scale data processing 547 21 ■ Cloud Pub/Sub: managed event publishing 568 contents foreword xvii preface xix acknowledgments xxi about this book xxiii about the cover illustration xxvii PART 1 GETTING STARTED ..............................................1 1 What is “cloud”? 3 1.1 What is Google Cloud Platform? 4 1.2 Why cloud? 4 Why not cloud? 5 1.3 What to expect from cloud services 6 Computing 6 ■ Storage 7 ■ Analytics (aka, Big Data) 8 Networking 8 ■ Pricing 9 1.4 Building an application for the cloud 9 What is a cloud application? 9 ■ Example: serving photos 10 Example projects 12 1.5 Getting started with Google Cloud Platform 13 Signing up for GCP 13 ■ Exploring the console 14 Understanding projects 15 ■ Installing the SDK 16 vii viii CONTENTS 1.6 Interacting with GCP 18 In the browser: the Cloud Console 18 ■ On the command line: gcloud 20 ■ In your own code: google-cloud-* 22 2 Trying it out: deploying WordPress on Google Cloud 24 2.1 System layout overview 25 2.2 Digging into the database 26 Turning on a Cloud SQL instance 27 ■ Securing your Cloud SQL instance 28 ■ Connecting to your Cloud SQL instance 30 Configuring your Cloud SQL instance for WordPress 30 2.3 Deploying the WordPress VM 31 2.4 Configuring WordPress 33 2.5 Reviewing the system 36 2.6 Turning it off 37 3 The cloud data center 38 3.1 Data center locations 39 3.2 Isolation levels and fault tolerance 42 Zones 42 ■ Regions 42 ■ Designing for fault tolerance 43 Automatic high availability 45 3.3 Safety concerns 45 Security 46 ■ Privacy 47 ■ Special cases 48 3.4 Resource isolation and performance 48 PART 2 STORAGE ..........................................................51 4 Cloud SQL: managed relational storage 53 4.1 What’s Cloud SQL? 54 4.2 Interacting with Cloud SQL 54 4.3 Configuring Cloud SQL for production 60 Access control 60 ■ Connecting over SSL 61 ■ Maintenance windows 66 ■ Extra MySQL options 67 4.4 Scaling up (and down) 68 Computing power 69 ■ Storage 69 4.5 Replication 71 Replica-specific operations 75 CONTENTS ix 4.6 Backup and restore 75 Automated daily backups 76 ■ Manual data export to Cloud Storage 77 4.7 Understanding pricing 81 4.8 When should I use Cloud SQL? 83 Structure 83 ■ Query complexity 84 ■ Durability 84 Speed (latency) 84 ■ Throughput 84 4.9 Cost 85 Overall 85 4.10 Weighing Cloud SQL against a VM running MySQL 87 5 Cloud Datastore: document storage 89 5.1 What’s Cloud Datastore? 90 Design goals for Cloud Datastore 91 ■ Concepts 92 Consistency and replication 96 ■ Consistency with data locality 99 5.2 Interacting with Cloud Datastore 101 5.3 Backup and restore 107 5.4 Understanding pricing 110 Storage costs 110 ■ Per-operation costs 110 5.5 When should I use Cloud Datastore? 111 Structure 111 ■ Query complexity 112 ■ Durability 112 Speed (latency) 112 ■ Throughput 113 ■ Cost 113 Overall 113 ■ Other document storage systems 115 6 Cloud Spanner: large-scale SQL 117 6.1 What is NewSQL? 118 6.2 What is Spanner? 118 6.3 Concepts 118 Instances 119 ■ Nodes 120 ■ Databases 120 ■ Tables 120 6.4 Interacting with Cloud Spanner 121 Creating an instance and database 122 ■ Creating a table 125 Adding data 127 ■ Querying data 127 ■ Altering database schema 131 6.5 Advanced concepts 132 Interleaved tables 133 ■ Primary keys 136 ■ Split points 137 Choosing primary keys 138 ■ Secondary indexes 139 Transactions 145

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.