ENGLISH

Microservices with Go

Book information

Publisher
Packt Publising Pvt Ltd
Year
2022
ISBN
9781804617007
Language
english
Format
PDF
Filesize
4 MB (4365687 bytes)
Pages
\329
Time added
2022-12-04 20:32:15

Description

Mastering the art of Go microservice development Key Features Helps to create and organize well-structured Go microservices Provides industry best practices and insights on Go microservice development tools, patterns, and solutions Covers hands-on Golang examples in each chapter Book Description This book is covering the key benefits and common issues of microservices, helping the readers to understand which problems microservice architecture helps to solve and which issues it usually introduces. The chapter highlights the importance of using the right principles and standards in order to achieve the key benefits of microservice architecture, emphasizing the role of the Go programming language as one of the most popular languages for microservice development and laying down the foundation for the next chapters of the book. The foundational aspects of Go microservice development include service scaffolding, service discovery, data serialization, synchronous and asynchronous communication, deployment, and orchestration and testing. The part is primarily focusing on the development aspects while the following part is covering maintenance and reliability topics. The last part is covering more advanced topics of Go microservice development including system reliability, observability, maintainability, and scalability. The part includes lots of best practices and examples which illustrate how to apply the key ideas to the existing applications, using two applications scaffolded in the previous part as examples. What you will learn Learn to build scalable and reliable Go microservices Get familiar with the industry’s best practices and solutions in microservice development Learn the advanced microservice reliability techniques Understand service discovery in the microservices environment Explore reliability and observability principles Who This Book Is For This book is for all types of developers: from people interested in learning how to write microservices and applications in Go to seasoned professionals who want to take the next step in mastering the art of writing scalable and reliable microservice-based systems. Table of Contents Introduction to microservices Scaffolding a Go microservice Service discovery Serialization Synchronous communication Asynchronous communication Deployment and orchestration Unit and Integration Testing Reliability overview Observability Setting up Service Alerting Advanced Topics Cover Title Page Copyright and Credits Contributors Table of Contents Preface Part 1: Introduction Chapter 1: Introduction to Microservices What is a microservice? Motivation to use microservices Pros and cons of microservices Benefits of microservices Common issues of microservices When to use microservice architecture Role of Go in microservice development Summary Further reading Part 2: Foundation Chapter 2: Scaffolding a Go Microservice Technical requirements Go basics Core principles Writing idiomatic Go code Interfaces Tests Context Project structure Private packages Public packages Executable packages Other commonly used directories Common files Best practices Scaffolding an example application Movie application Application code structure Movie metadata service Movie service Summary Further reading Chapter 3: Service Discovery Technical requirements Service discovery overview Registry Service discovery models Service health monitoring Service discovery solutions HashiCorp Consul Kubernetes Adopting service discovery Preparing the application Implementing the discovery logic Using the discovery logic Summary Further reading Chapter 4: Serialization Technical requirements The basics of serialization Popular serialization formats Using Protocol Buffers Best practices for serialization Summary Further reading Chapter 5: Synchronous Communication Technical requirements Introduction to synchronous communication Go RPC frameworks and libraries Defining a service API using Protocol Buffers Implementing gateways and clients Metadata service Rating service Movie service Summary Further reading Chapter 6: Asynchronous Communication Technical requirements Asynchronous communication basics Benefits and challenges of asynchronous communication Techniques and patterns of asynchronous communication Using Apache Kafka for messaging Adopting Kafka for our microservices Asynchronous communication best practices Versioning Leveraging partitioning Summary Further reading Chapter 7: Storing Service Data Technical requirements Introduction to database Using MySQL to store our service data Summary Further reading Chapter 8: Deployment with Kubernetes Technical requirements Preparing application code for deployments Deployment basics Application configuration Deploying via Kubernetes Introduction to Kubernetes Setting up our microservices for Kubernetes deployments Deployment best practices Automated rollbacks Canary deployments Replace with Continuous Deployment (CD) Summary Further reading Chapter 9: Unit and Integration Testing Technical requirements Go testing overview Unit tests Mocking Implementing unit tests Integration tests Testing best practices Using helpful messages Avoiding the use of Fatal in your logs Making a comparison using a cmp library Summary Further reading Part 3: Maintenance Chapter 10: Reliability Overview Technical requirements Reliability basics Achieving reliability through automation Communication error handling Graceful shutdown Achieving reliability through development processes and culture On-call process Incident management Reliability drills Summary Further reading Chapter 11: Collecting Service Telemetry Data Technical requirements Telemetry overview Collecting service logs Choosing the logging library Using logging features Storing microservice logs Logging best practices Collecting service metrics Storing metrics Popular Go metrics libraries Emitting service metrics Metrics best practices Tracing Tracing tools Collecting tracing data with the OpenTelemetry SDK Summary Further reading Chapter 12: Setting Up Service Alerting Technical requirements Alerting basics Alerting use cases Introduction to Prometheus Setting up Prometheus alerting for our microservices Alerting best practices Summary Further reading Chapter 13: Advanced Topics Technical requirements Profiling Go services Creating microservice dashboards Frameworks Storing microservice ownership data Securing microservice communication with JWT JWT basics Implementing authentication and authorization with JWTs Summary Further reading Index Other Books You May Enjoy

Similar books

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

2010 · PDF

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

1858 · PDF

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

2022 · PDF

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

1809 · PDF