BIG-IP Local Tra C Manager & BIG-IP Global Tra C Manager . - BAKOTECH

Transcription

BIG-IP Local Traffic Manager &BIG-IP Global Traffic ManagerOperations GuideMore Power, On DemandAll BIG-IP solutions include either BIG-IP LocalTraffic Manager (LTM) or BIG-IP Global TrafficManager (GTM). Each provide powerful corefunctionality to your application services.

A message from Julian Eames,Executive Vice President, F5 Business OperationsWelcome to the F5 Operations Guide series.Our series of operations guides address real-world scenarios and challenges. The contentwas written by the engineers who design, build, and support our products, as well as otherF5 professionals—some former customers worked in the field and have firsthand experience.While no document can anticipate every question or situation, F5 endeavors to provide abetter understanding of your BIG-IP system and offer tools needed to address commonissues and conditions.In this guide you’ll find recommendations, practices, and troubleshooting tips to keep your F5products running at peak efficiency and elements that may be incorporated into your own runbooks.F5 is pleased to offer industry-leading products and services, including world-class supportand welcome your suggestions and feedback. Let us know how we can better serve you.—Julian Eamesi

ContentsAcknowledgments1About this guide2Before using this guide2Limits of this guide2Glossary3Customization3Issue escalation3Feedback and notifications4Document conventions4Change list6Introduction7Core concepts7BIG-IP LTM nomenclature8Topologies8CMP/TMM basicsBIG-IP LTM load balancing1416BIG-IP LTM load balancing methods16Monitors20Troubleshooting30BIG-IP LTM network address objects34Virtual address34Address translation35Self IP address37IPv4/IPv6 gateway behavior37Auto Last Hop37BIG-IP LTM virtual serversVirtual server basics4040ii

Virtual server types42Practical considerations44Virtual server troubleshooting45BIG-IP LTM profiles49Protocol profiles49OneConnect50HTTP profiles52HTTP compression profile53Web acceleration profile53SSL Profiles53BIG-IP LTM policies56Persistence profiles57Other protocols and profiles59Troubleshooting60BIG-IP GTM/DNS Services63iRules63BIG-IP GTM/DNS Services Basics63BIG-IP GTM/DNS Services Core Concepts64Configuration synchronization65BIG-IP GTM load balancing75Architectures78BIG-IP GTM iQuery79BIG-IP GTM/DNS troubleshooting84iRules87Anatomy of an iRules87iRules considerations92iRules troubleshooting93LoggingLogging considerations9799iii

Optimize the support experience102F5 technical support commitment102F5 certification103Self-help104F5 global training services107Engage Support108Legal ion Date116Publication Number116Copyright116iv

ACKNOWLEDGMENTS— AcknowledgmentsExecutive sponsor: Julian Eames, Executive Vice President, Business OperationsPublisher and project manager: Jeanne LewisContent and production editor: Andy KoopmansProject team, writers, editors, and testers: Eric Flores, Angus Glanville, Nathan McKay, John Tapparo, Geoffrey Wang, AmyWilhelm, and Michael Willhight.BookSprints facilitators, designer, editor, and support team: Adam Hyde, Henrik van Leeuwen, Raewyn White, Juan CarlosGutiérrez Barquero, Julien Taquet, Laia Ros, and Simone Poutnik.Content, support, and assistance: Don Martin, Vice President, Global Services Strategic Development; the Global Services NewProduct Introduction Team, Bryan Gomes, Phillip Esparza, Derek Smithwick, Beth Naczkowski, Joe Taylor, Mark Kramer, AndrewPemble, Dave Bowman, Jim Williams, David Katz; and the rest of the Global Services management team.1

ABOUT THIS GUIDE—LIMITS OF THIS GUIDEAbout this guideThis guide includes recommended maintenance and monitoring procedures related to F5 BIG-IP Local Traffic Manager (LTM)and Global Traffic Manager (GTM) versions 11.2.1–11.6.0.The goal of this guide is to assist F5 customers with keeping their BIG-IP system healthy, optimized, and performing as designed.It was written by F5 engineers who assist customers with solving complex problems every day. Some of these engineers werecustomers before joining F5. Their unique perspective and hands-on experience has been leveraged to serve the operational andmaintenance guides F5 customers have requested.This guide describes common information technology procedures and some that are exclusive to BIG-IP systems. There may beprocedures particular to your industry or business that are not identified. While F5 recommends the procedures outlined in thisguide, they are intended to supplement your existing operations requirements and industry standards. F5 suggests that you readand consider the information provided to find the procedures to suit your implementation, change-management process, andbusiness-operations requirements. Doing so can result in fewer unscheduled interruptions and higher productivity.See “Feedback and notifications” on page 4 for information on how to help improve future versions of the guide.Before using this guideYou will get the most out in this guide if you have already completed the following, as appropriate to your implementation: Installed your F5 platform according to its requirements and recommendations. Search the AskF5 Knowledge Base(support.f5.com) for “platform guide” to find the appropriate guide. Followed the general environmental guidelines in the hardware platform guide to make sure of proper placement, airflow,and cooling. Set recommended operating thresholds for your industry, accounting for seasonal changes in load. For assistance, youcan contact F5 Consulting Services. Familiarized yourself with F5 technology concepts and reviewed and applied appropriate recommendations from F5BIG-IP TMOS: Operations Guide.Limits of this guideThis guide does not address installation, setup, or configuration of your BIG-IP system or modules.There is a wealth of documentation covering these areas in AskF5 Knowledge Base (support.f5.com) The F5 self-help community,DevCentral (devcentral.f5.com), is also a good place to find answers about initial deployment and configuration. You can findadditional resources detailed in “Acknowledgments” on page 1.The following figure shows where this guide can best be applied in the product life cycle.2

ABOUT THIS GUIDE—ISSUE ESCALATIONFigure 0.1: F5 documentation coverageGlossaryA glossary is not included in this document. Instead, the Glossary and Terms page (f5.com/glossary) offers an up-to-date andcomplete listing and explanation of common industry and F5-specific terms.CustomizationCustomization may benefit your implementation. You can get help with customization from a subject matter expert, such as aprofessional services consultant from F5 Consulting Services (f5.com/support/professional-services).Issue escalationSee “Optimize the support experience” on page 102 for issue escalation information. Customers with websupport contractscan also open a support case by clicking Open a support case on the AskF5 Knowledge Base page (support.f5.com)3

ABOUT THIS GUIDE—DOCUMENT CONVENTIONSFeedback and notificationsF5 welcomes feedback and requests and invites you to fill out and submit the surveys at the end of each chapter in the interactivePDF version of this guide or to visit our F5 Operations Guide User Feedback survey. (This link sends you to an external site.)F5 operations guides are updated frequently and new guides are being written. If you would like to be notified when new contentis available, email opsguide@f5.com and your name will be added to our distribution list for updates and new releases.Document conventionsTo help you easily identify and understand important information, the document in this guide uses the stylistic conventionsdescribed here.ExamplesAll examples in this document use only private IP addresses. When you set up the configurations described, you will need to usevalid IP addresses suitable to your own network in place of our sample addresses.References to objects, names, and commandsWe apply bold text to a variety of items to help you easily pick them out of a block of text. These items include interface labels,specific web addresses, IP addresses, and directories.Note Unless otherwise noted, all documents referenced in this guide can befound by searching by title at AskF5 (support.F5.com).Configuration utilityThe BIG-IP Configuration utility is the name of the graphic user interface (GUI) of the BIG-IP system and its modules. It is abrowser-based application you can use to install, configure, and monitor your BIG-IP system.Configuration utility menus, sub-menus, links, and buttons are formatted in bold text. For more information about theConfiguration utility, see Introducing BIG-IP Systems in BIG-IP Systems: Getting Started Guide.Command line syntaxWe show command line input and output in courier font. The corresponding prompt is not included. For example, the followingcommand shows the configuration of the specified pool name:tmsh show /ltm pool my poolThe following table explains additional special conventions used in command-line syntax:Table 0.1 Command-line syntax4

ABOUT THIS GUIDE—DOCUMENT CONVENTIONSCharacterDescription Identifies a user-defined variable parameter. For example, ifthe command has your name , type in your name but donot include the brackets.[]Indicates that syntax inside the brackets is optional.Indicates that you can type a series of items.TMOS shell syntaxThe BIG-IP system includes a tool known as the TMOS shell (tmsh) that you can use to configure and manage the system fromthe command line. Using tmsh, you can configure system features, and set up network elements. You can also configure theBIG-IP system to manage local and global traffic passing through the system, and view statistics and system performance data.You can run tmsh and issue commands in the following ways: You can issue a single tmsh command at the BIG-IP system prompt using the following syntax:tmsh [command] [module . . . module] [component] (options) You can open tmsh by typing tmsh at the BIG-IP system prompt:(tmos)#Once at the tmos prompt, you can issue the same command syntax, leaving off tmsh at the beginning.For the sake of brevity all tmsh commands provided in this guide appear in the first format.Note You can use the command line utilities directly on the BIG-IP systemconsole, or you can run commands using a remote shell, such as the SSHclient or a Telnet client. For more information about command line utilities,see Bigpipe Utility Reference Guide or the Traffic Management Shell (tmsh)Reference Guide.5

ABOUT THIS GUIDE—CHANGE LISTChange listDateAugust 2015August 2015Chapter/SectionBIG-IP LTM LoadBalancing/BIG-IP LTM LoadBalancing MethodsAllChangeCorrection to descriptionof Figure 2.3: Loadbalancing.Updates to formattingAddition of surveysReasonErrorNew Operations Guidestyle.6

INTRODUCTION—CHANGE LISTIntroductionThe BIG-IP Local Traffic Manager (LTM) module manages and optimizes traffic for network applications and clients. Some typical tasks that BIG-IP LTM can perform include: Automatically balancing application traffic amongst multiple servers. Caching and compressing HTTP content. Inspecting and transforming application content. Offloading SSL decryption to BIG-IP LTM. Isolating applications from harmful network traffic.BIG-IP LTM runs on TMOS, which is the base platform software on all F5 hardware platforms and BIG-IP Virtual Edition (VE).F5 hardware platforms include acceleration hardware, which may include SSL acceleration, compression acceleration, and anembedded Packet Velocity Accelerator chip (ePVA), which can significantly increase the available throughput of BIG-IP LTM.BIG-IP VE is available for several popular hypervisor products, which allows BIG-IP LTM to be integrated into a virtual data centerinfrastructure. Additionally, it is available on a number of leading cloud providers.Core conceptsBIG-IP LTM treats all network traffic as stateful connection flows. Even connectionless protocols such as UDP and ICMP aretracked as flows. BIG-IP LTM is a default-deny device: unless traffic matches a configured policy, it will be rejected. BIG-IPsystems act as a full proxy, meaning that connections through BIG-IP LTM are managed as two distinct connection flows: aclient-side flow and a server-side flow.Figure 1.1: BIG-IP system full proxy architectureMore detail about BIG-IP LTM connection handling will be covered in subsequent chapters of this guide.7

INTRODUCTION—TOPOLOGIESBIG-IP LTM nomenclature Nodes - A configuration object represented by the IP address of a device on the network. Pool Members - A pool member is a node and service port to which BIG-IP LTM can load balance traffic. Nodes can bemembers of multiple pools. Pools - A configuration object that groups pool members together to receive and process network traffic in a fashiondetermined by a specified load balancing algorithm. Monitors - A configuration object that checks the availability or performance of network resources such as pool membersand nodes. Virtual servers - A virtual server allows BIG-IP systems to send, receive, process, and relay network traffic. Profiles - Configuration objects that can be applied to virtual servers to affect the behavior of network traffic.TopologiesBIG-IP systems can be deployed to a network with little to no modification to existing architecture. However, to optimize theperformance of your network and applications, some environment changes may be required to take full advantage of themultipurpose functionality of BIG-IP systems.There are three basic topologies for load-balanced applications with BIG-IP LTM: one-armed, two-armed, and nPath. nPath isalso known as Direct Server Return, or DSR.One-armed deploymentIn this deployment, the virtual server is on the same subnet and VLAN as the pool members. Source address translation must beused in this configuration to ensure that server response traffic returns to the client via BIG-IP LTM.8

INTRODUCTION—TOPOLOGIESFigure 1.2: One-armed deploymentAdvantages of this topology Allows for rapid deployment. Requires minimal change to network architecture to implement. Allows for full use of BIG-IP LTM feature set.Considerations for this topologyClient IP address is not visible to pool members as the source address will be translated by the BIG-IP LTM. This preventsasymmetric routing of server return traffic. (This can be changed for HTTP traffic by using the X-Forwarded-For header).9

INTRODUCTION—TOPOLOGIESTwo-armed deploymentIn this topology, the virtual server is on a different VLAN from the pool members, which requires that BIG-IP systems route trafficbetween them. Source address translation may or may not be required, depending on overall network architecture. If thenetwork is designed so that pool member traffic is routed back to BIG-IP LTM, it is not necessary to use source addresstranslation.Figure 1.3: Two-armed deploymentIf pool member traffic is not routed back to BIG-IP LTM, it is necessary to use source address translation to ensure it is translatedback to the virtual server IP. The following figure shows a deployment scenario without source address translation:10

INTRODUCTION—TOPOLOGIESFigure 1.4: Two-armed deployment without source addressThe following illustration shows the same deployment scenario using source address translation:11

INTRODUCTION—TOPOLOGIESFigure 1.5: Two-armed deployment using source address translationAdvantages of this topology Allows preservation of client source IP. Allows for full use of BIG-IP LTM feature set. Allows BIG-IP LTM to protect pool members from external exploitation.Considerations for this topology May necessitate network topology changes in order to ensure return traffic traverses BIG-IP LTM.12

INTRODUCTION—TOPOLOGIESnPath deploymentnPath, also known by its generic name Direct Server Return (DSR), is a deployment topology in which return traffic from poolmembers is sent directly to clients without first traversing the BIG-IP LTM. This allows for higher theoretical throughput becauseBIG-IP LTM only manages the incoming traffic and does not process the outgoing traffic. However, this topology significantlyreduces the available feature set that BIG-IP LTM can use for application traffic. If the specific use case for nPath is justified, SeeBIG-IP Local Traffic Manager: Implementations covering nPath deployments.Figure 1.6: nPath deploymentAdvantages of this topology Allows maximum theoretical throughput. Preserves client IP to pool members.Considerations for this topology Limits availability of usable features of BIG-IP LTM and other modules. Requires modification of pool members and network. Requires more complex troubleshooting.13

INTRODUCTION—CMP/TMM BASICSCMP/TMM basicsData plane traffic on BIG-IP LTM is handled by Traffic Management Micro-kernel (TMM). TMM operates on the concept ofClustered Multiprocessing (CMP), which creates multiple TMM process. To achieve high performance network trafficprocessing, traffic is distributed, connection flows to the various TMMs, based on an F5 proprietary layer-4 algorithm.There are a few circumstances where certain configurations may function differently in relation to CMP. These are discussed invarious chapters of this guide.For more information about CMP, see the following AskF5 articles: SOL14358: Overview of Clustered Multiprocessing - (11.3.0 and later) SOL14248: Overview of Clustered Multiprocessing - (11.0.0 - 11.2x)14

Help improve this guidePlease help F5 improve this guide by responding to a few questions about this chapter.(Note: You must be viewing this document in Adobe Acrobat Reader or similar to use this form.)Did this chapter answer all of your questions about the subject matter?YesNoYesNoYesNoIf not, what information should be included that is not? Did you find any errors pertaining to subject matter in this chapter?If yes, please describe the error: If yes, please copy and paste the paragraph containing the error here: Did you find non-subject-matter errors in this chapter (spelling, etc.)?If yes, please describe the error: If yes, please copy and paste the paragraph containing the error here: Send

BIG-IP LTM LOAD BALANCING—BIG-IP LTM LOAD BALANCING METHODSBIG-IP LTM load balancingBIG-IP systems are designed to distribute client connections to load balancing pools that are typically comprised of multiple poolmembers. The load balancing method (or algorithm) determines how connections are distributed across pool members. Loadbalancing methods fall into one of two distinct categories: static or dynamic. Factors, such as pool member availability andsession affinity, sometimes referred to as stickiness, influence the choice of load balancing method.BIG-IP LTM load balancing methodsCertain load-balancing methods are designed to distribute connections evenly across pool members, regardless of the poolmembers’ or nodes’ current workload is. These methods tend to work better with homogeneous server pools and/orhomogeneous workloads. An example of a homogeneous server pool is one that is comprised of servers that all have similarprocessing performance and capacity. Another example of a homogeneous workload is one in which all connections areshort-lived or all requests/responses are similar in size. Other load-balancing methods are designed to favor higher performingservers, possibly resulting in deliberately uneven traffic distribution across pool members. Some load-balancing methods takeinto account one or more factors that change at run time, such as current connection count or capacity; others do not.Static vs. dynamicStatic load balancing methods distribute incoming connections in a uniform and predictable manner regardless of load factoror current conditions. For example, the Round Robin method causes the BIG-IP LTM system to send each incoming connectionto the next available pool member, thereby distributing connections evenly across the pool members over time.Dynamic load balancing methods distribute connections by factoring in the current conditions when making a load balancingdecision. Current metrics and statistics are used to derive and adjust the traffic distribution pattern without administratorintervention based on criteria such as the number of connections a server is currently processing. For example, the Observedload balancing method causes higher performing servers to process more connections over time than lower performing servers.Static load balancing methodsRound Robin is the default load balancing method on a BIG-IP system. It is a static load balancing method since no dynamicrun-time information, except pool member status, is used in the Round-Robin algorithm to select the next pool member. TheRound-Robin load balancing method works best when the pool members are roughly equal in processing and memory capacity,and the application’s requests use the servers’ resources equally.Ratio load balancing method distributes new connections across available members in proportion to a user-defined ratio. Thismode is useful when members have disparate available capacities. For example, if a pool contains one fast server and threeslower servers, the ratio can be set so the fast server receives more connections. The ratio can be set for each member or eachnode. Ratio mode distributes new connections in a weighted round-robin pattern. The following figure shows how connectionswould be distributed if the ratio values were set to 3:2:1:1.16

BIG-IP LTM LOAD BALANCING—BIG-IP LTM LOAD BALANCING METHODSFigure 2.1: Distribution of connections using static load balancingDynamic load balancing methodsThe Least Connections method distributes new connections across available members based on the current connection countbetween BIG-IP system and the server. It does not account for connections the servers may have with other systems. This modeis a good general-purpose distribution method for most workloads, but it may be especially useful when supporting long-livedconnections like FTP and TELNET. Over time, connections should be distributed relatively evenly across the pool. If multipledevices all currently have a similar number of low connections, traffic is distributed across them in a round robin pattern. Thefollowing figure shows how six connections would be distributed, given the connection counts shown below each pool memberand assuming that no connections close during the process.17

BIG-IP LTM LOAD BALANCING—BIG-IP LTM LOAD BALANCING METHODSFigure 2.2: Distribution of connections using dynamic load balancingThe Fastest load balancing method distributes new connections to the member or node that currently has the fewestoutstanding layer 7 requests. If the virtual server does not have both a TCP and layer 7 profile assigned, BIG-IP LTM cannot trackrequests and responses. Load balancing will fall back to least connections.This mode is useful for distributing traffic to devices that may differ in their response times depending on the load that previousrequests have placed on the system. Over time, connections are distributed relatively evenly if all servers have similar capabilities.There are many more static and dynamic load balancing methods besides the ones listed here. For more information aboutadditional methods, search the F5 support page (support.f5.com).18

BIG-IP LTM LOAD BALANCING—BIG-IP LTM LOAD BALANCING METHODSPriority group activationPriority group activation allows pool members to be used only if preferred pool members are unavailable. Each pool member isassigned a priority, and connections are sent to the highest priority pool members first. A minimum number of available membersis assigned, and if fewer than this number become available, the next highest priority pool members are activated.For example, in the following figure, three physical hardware pool members have been assigned a priority of 10. Three additionalvirtual machines have been deployed as backup and assigned a priority of 5.If the Priority Group Activation setting is 2, when all of the pool members are available, only the physical nodes in the Priority 10group will be used.Figure 2.3: Load balancing using priority group activationHowever, if fewer than 2 Priority 10 pool members become available, virtual machines in Priority 5 group will be usedautomatically.19

BIG-IP LTM LOAD BALANCING—MONITORSFigure 2.4: Load balancing using priority group activation with nodes downPriority group activation does not modify persistence behavior: any new connections sent to lower-priority members will continueto persist even when higher priority members become available again.FallBack host (HTTP only)If all members of a pool fail, virtual servers configured with a FallBack host in an attached HTTP profile can send an HTTPredirect message to the client. This allows the administrator to send connections to an alternate site or an apology server. Thisoption is configured through the HTTP profile.MonitorsMonitors are used by BIG-IP systems to determine whether a pool member (server) is eligible to service application traffic.Monitors can be very simple or very complex depending on the nature of the application. Monitors enable BIG-IP systems togauge the health of pool members, by periodically making specific requests of them in order to evaluate their statuses based on20

BIG-IP LTM LOAD BALANCING—MONITORSthe responses received or not received.How monitors add valueWhen implemented properly, a monitor can alert you to stability and availability issues that may exist with an application or ariseas the result of a deliberate or unexpected change to application infrastructure. Monitors can make explicit requests to anapplication, causing it to perform an action which will in turn test vital back-end resources of that application, such as a SQLdatabase.Monitors can also be used to remove pool members from load balancing during scheduled maintenance windows. Note that thiscan also be done by manually disabling pool members within BIG-IP system configuration, however using a maintenance monitorto facilitate this may preclude the need to:1. Grant application owners operator level access to the BIG-IP system.2. Sync the configuration after the pool member is removed from load balancing, and again after it is returned to service.A maintenance monitor would be most useful in conjunction with an application health monitor.Monitor componentsBIG-IP systems include native support for a wide number of protocols and proprietary applications and services (for example,TCP, UDP, HTTP, HTTPS, SIP, LDAP, SOAP, MSSQL, MySQL, etc.). Each monitor type will be made up of options relevant to themonitor type, but in general, each will have a request to send and a response to expect. There is also the option of configuring ahost and port to send the request to a host other than one of the pool members (alias hosts and ports), if necessary.With respect to HTTP and TCP monitors for example, the send string and receive string options determine what requests aresent to the pool members or alias hosts, and what responses are required to be returned in order for the monitoring conditions tobe satisfied, and the pool member(s) subsequently marked as available.If the available options don’t suit the application, custom monitors can be created and executed using external scripts, or byconstructing custom strings to be sent to the application over TCP or UDP.Monitor implementationTypically, a monitor will be created that uses the same protocol and simulates a normal request to the back-end pool membersthat would otherwise be received as part of legitimate client traffic. For instance, in the case of an HTTP-based application, themonitor may make an HTTP request to a web page on the pool member. Assuming a response is received within the timeoutwindow, the response data will be evaluated against the configured receive string to ensure proper or expected operation of theservice.Choosing an effective receive stringWherever possible, the request string and the receive string should be as explicit as possible. HTTP receive strings are matched21

BIG-IP LTM LOAD BALANCING—MONITORSagainst not only the HTTP content itself (for example HTML, JSON, or plain text), but the HTTP headers as well. See AskF5article: SOL3618: BIG-IP HTTP health monitors match receive string against payload and HTTP headers (including cookies) fordetails.While it may seem intuitive to simply match strings against the HTTP response code (such as “200” for a good response), someweb applications will generate 404 or “page not found” errors using the “200” response code. Additionally, other headers mayinclude digits which would also match “200,” such as a “Content-Length: 120055” or a “Set-Cookie:” header that includes thosedigits. If a match against a “200” response code is not desired, it is best to explicitly set “HTTP/1.1 200 OK” (assuming an HTTPversion 1.1 response) as the receive string.Note that some applications have built-in uniform response identifiers (URIs) that can be used to determine application health, soyou may need to contact the application vendor to see if URIs are implemented. When dealing with a custom, or in-housedeveloped application, the development team can build a page that executes a test suite and responds to BIG-IP system healthchecks as appropriate. For example:ltm monitor http finance.example.com health http monitor {adaptive disableddefaults-from httpdestination *:*interval 5ip-dscp 0recv “HTTP/1.1 200 OK”send “GET /app-health-check/status HTTP/1.1\r\nHost: finance.example.com\r\nConnection: close\r\n\r\n”time-until-up 0timeout 16}Using monitors for pool member maintenanceOne of the most common operational tasks that BIG-IP system administrators face is to enable and disable pool members duringmaintenance windows. While this can be achieved by logging on to the BIG-IP system and manually setting a given poolmember’s state, it may n

Local Traffic Manager (LTM) and Global Traffic Manager (GTM) versions 11.2.1-11.6.0. The goal of this guide is to assist F5 customers with keeping their BIG-IP system healthy, optimized, and performing as designed. It was written by F5 engineers who assist customers with solving complex problems every day. Some of these engineers were