Hands-On Networking with Azure Build large-scale, real-world apps using Azure networking solutions Mohamed Waly BIRMINGHAM - MUMBAI Hands-On Networking with Azure Copyright © 2018 Packt Publishing All rights reserved No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews Every effort has been made in the preparation of this book to ensure the accuracy of the information presented However, the information contained in this book is sold without warranty, either express or implied Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals However, Packt Publishing cannot guarantee the accuracy of this information Commissioning Editor: Vijin Boricha Acquisition Editor: Rahul Nair Content Development Editor: Nithin Varghese Technical Editor: Komal Karne Copy Editor: Safis Editing Project Coordinator: Virginia Dias Proofreader: Safis Editing Indexer: Mariammal Chettiyar Graphics: Tom Scaria Production Coordinator: Arvindkumar Gupta First published: March 2018 Production reference: 1060318 Published by Packt Publishing Ltd Livery Place 35 Livery Street Birmingham B3 2PB, UK ISBN 978-1-78899-822-2 www.packtpub.com To the soul of my father, the one I wished to witness such a moment with – Mohamed Waly mapt.io Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career For more information, please visit our website Why subscribe? Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals Improve your learning with Skill Plans built especially for you Get a free eBook or video every month Mapt is fully searchable Copy and paste, print, and bookmark content PacktPub.com Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.Pa cktPub.com and as a print book customer, you are entitled to a discount on the eBook copy Get in touch with us at service@packtpub.com for more details At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks Contributors About the author Mohamed Waly has been interested in IT since he was a student He has gained many certificates in the IT field In July 2014, he was recognized as the youngest MVP in the world He is an author, speaker, and a blogger He has contributed to the Azure Community in Egypt and open source on Azure Waly is currently working as an infrastructure consultant for BlueCloud Technologies, designing and implementing solutions for customers across MEA This book would not have seen the light without the help of many people I'd like to thank the team at Packt Publishing—Rahul Nair, Komal Karne, Nithin George, and the other contributors I'd like to thank Bert Wolters, Charbel Nemnom, and Sjoukje Zaal for their endless support Also, my teammates at BlueCloud Technologies—Moataz Shaaban, Karim Hamdy, Mohamed Saeed, Emad Samir, and my manager, Mahmoud Dwidar Configuring multi-site listener To configure the multi-site listener, you need to follow these steps: Navigate to the application gateway Under SETTINGS, click on Listeners, and a new blade will be opened Click on Multi-site and a new blade will be opened wherein you have to specify the following: Name: Specify a descriptive name for the listener Frontend IP configuration: Select the frontend IP configurations that should be associated with the listener Frontend port: You can either select a pre-created frontend port or create a new one Host name: Specify the host name on which multiple websites are hosted Protocol: Specify the used protocol whether it is HTTP or HTTPS Figure 8.20: Create multi-site listener Once you have clicked on OK, the listener will be added Configuring rules Rules are used to specify how the traffic will flow The following are two types of rules: Basic: In this case, any incoming traffic might access the desired content from multiple backend servers Path-based: In this case, if you want to access a specific content, you will access specific backend servers to access the content Configuring basic rule To configure a basic rule, you need to follow these steps: Navigate to the application gateway Under SETTINGS, click on Rules, and a new blade will be opened, as shown in the following screenshot: Figure 8.21: Application gateway rules To add a basic rule, click on Basic, and a new blade will be opened wherein you have to specify the following: Name: Specify a descriptive name for the rule Listener: Specify the listener to which this rule will be associated Backend pool: Specify the backend pool to which this rule will be associated HTTP setting: Specify to which HTTP setting this rule will be associated Figure 8.22: Configure basic rule Once you are done, click on OK and the rule will be created Configuring path-based rule To configure a path-based rule, you need to follow these steps: Navigate to the application gateway Under SETTINGS, click on Rules, and a new blade will be opened To add a path-based rule, click on Path-based, and a new blade will be opened wherein you have to specify the following: Name: Specify a descriptive name for the rule Listener: Specify the listener that will be associated with this rule Default backend pool: Specify the backend pool to which this rule will be associated Default HTTP settings: Specify the HTTP settings that will be associated with this rule Then, you have to specify the paths by specifying the following: NAME: Specify a descriptive name for the path PATHS: Specify the path itself BACKEND POOL: Specify the backend pool on which this path exists HTTP SETTINGS: Specify the HTTP settings that will be applied Figure 8.23: Configure path-based rule Once you are done, click on OK, and the rule will be added Configuring health probes By now, you should be aware that probes are used to monitor the health of the backend pool You can create and customize probes according to your needs To so, you need to follow these steps: Navigate to the application gateway Under SETTINGS, click on Health probes, and a new blade will be opened: Figure 8.24: Health probes To create health probes, click on Add, and a new blade will be opened wherein you have to specify the following: Name: A descriptive name for the health probe Protocol: Select the protocol you use, whether it is HTTP or HTTPS Host: Specify the host that you want to monitor Path: Specify which path you want to monitor Interval (seconds): The period after which a new probe is being sent Timeout (seconds): The period after which the probe will be considered unresponsive Unhealthy threshold: The number of unresponsive probes after which the host will be considered unhealthy Figure 8.25: Create a health probe Once you are done, you can click on OK, and the health probe will be created Summary It was a fruitful journey working with Azure networking solutions More importantly, you should have learned by now how to work with most of the networking solutions supported on Azure Also, with the knowledge gained throughout the chapters, you should be able to design a solution that would suit your environment We hope you have gained the knowledge you need from this book, and we hope you enjoyed reading it as much as I enjoyed writing it Questions Azure Application Gateway provides a layer load balancing for any type of traffic (true/false) You can upgrade a standard Application Gateway to WAF (true/false) You can configure rules for the Application Gateway based on the content path (true/false) State and explain three of the Azure Application Gateway features State the types of Azure Application Gateway and the sizes of them State and explain the types of Azure Application Gateway listeners What is the maximum number of instances per Azure Application Gateway? Further reading If you are interested to know more about the topics that have been covered, you can check the following links: Creating an application gateway and virtual machine scale set using Azure PowerShell: https://docs.microsoft.com/en-us/azure/application-gateway /tutorial-create-vmss-powershell Application Gateway redirect overview: https://docs.microsoft.com/en-us/ azure/application-gateway/application-gateway-redirect-overview Configuring App Service Web Apps with Application Gateway: https ://docs.microsoft.com/en-us/azure/application-gateway/application-gateway-web-app -powershell Using load balancing services in Azure: https://docs.microsoft.com/en-us/ azure/traffic-manager/traffic-manager-load-balancing-azure?toc=%2fazure%2fapplica tion-gateway%2ftoc.json Other Books You May Enjoy If you enjoyed this book, you may be interested in these other books by Packt: Azure for Architects Ritesh Modi ISBN: 978-1-78839-739-1 Familiarize yourself with the components of the Azure Cloud platform Understand the cloud design patterns Use enterprise security guidelines for your Azure deployment Design and implement Serverless solutions See Cloud architecture and the deployment pipeline Understand cost management for Azure solutions Azure Serverless Computing Cookbook Praveen Kumar Sreeram ISBN: 978-1-78839-082-8 Develop different event-based handlers supported by serverless architecture supported by Microsoft Cloud Platform – Azure Integrate Azure Functions with different Azure Services to develop Enterprise-level applications Get to know the best practices in organizing and refactoring the code within the Azure functions Test, troubleshoot, and monitor the Azure functions to deliver highquality, reliable, and robust cloud-centric applications Automate mundane tasks at various levels right from development to deployment and maintenance Learn how to develop stateful serverless applications and also selfhealing jobs using Durable Functions Leave a review - let other readers know what you think Please share your thoughts on this book with others by leaving a review on the site that you bought it from If you purchased the book from Amazon, please leave us an honest review on this book's Amazon page This is vital so that other potential readers can see and use your unbiased opinion to make purchasing decisions, we can understand what our customers think about our products, and our authors can see your feedback on the title that they have worked with Packt to create It will only take a few minutes of your time, but is valuable to other potential customers, our authors, and Packt Thank you! .. .Hands- On Networking with Azure Build large- scale, real- world apps using Azure networking solutions Mohamed Waly BIRMINGHAM - MUMBAI Hands- On Networking with Azure Copyright ©... Creating an Azure DNS record using PowerShell Creating an Azure DNS record using Azure CLI 2.0 Configuring Azure DNS delegation using PowerShell Configuring Azure DNS delegation using Azure CLI... Network connectivity scenarios in Azure VNet2VNet connection VNet2VNet connection benefits Creating a VNet2VNet connection VNet2VNet connection key points Point-to-Site connection Point-to-Site connection