F5 Sites
  • F5.com
  • LearnF5
  • NGINX
  • MyF5
  • Partner Central
Contact
  • Under Attack?
  • F5 Support
  • DevCentral Support
  • F5 Sales
  • NGINX Sales
  • F5 Professional Services
Skip to contentBrand Logo
Forums
CrowdSRC
Articles
Groups
EventsSuggestionsHow Do I...?
RegisterSign In
  1. DevCentral
  2. CrowdSRC
  3. CodeShare

Single Node Persistence

Problem this snippet solves: A really slick & reliable way to stick to one and only one server in a pool. Requirement: Direct traffic to only a single node in a pool at a time. Initially, traffic ...
Published Mar 18, 2015
Version 1.0
application delivery
devops
iRules
persistence
CodeCentral_194's avatar
CodeCentral_194
Icon for Cirrus rankCirrus
Joined May 05, 2019
View Profile
CodeCentral_194's avatar
CodeCentral_194
Icon for Cirrus rankCirrus
Joined May 05, 2019
View Profile
k20's avatar
k20
Icon for Nimbostratus rankNimbostratus
Dec 17, 2018

OK people I still don't know how exactly dst addr persistence or iRule will help. Here's what I believe both methods will fail to deliver.

 

Scenario 1:

 

T=0, nodes A and B are both online (where T = time), and persistence table is empty T=1, PC1 and PC2 start to connect. 1 of 4 mappings below could happen as persistence entries are created:

 

  1. PC1-A and PC2-B
  2. PC1-B and PC2-A
  3. PC1-A and PC2-A
  4. PC1-B and PC2-B

As you can see, we don't want 1 or 2 to happen. Nothing dst addr persistence or iRule could help when persistence entries don't exist yet.

 

Scenario 2:

 

T=0, node A online and node B offline, and persistence table is empty. T=1, PC1 and PC2 start to connect. The following mappings will be created in the persistence table:

 

PC1-A and PC2-A

 

T=3, node B comes online, PC1, PC2 and PC3 connect. The following mappings could happen:

 

PC1-A PC2-A PC3-A or PC3-B

 

As you can see, PC1 and PC2 don't change. However, the new PC3 could go to node A or node B. This will result in some new PC's will go to A or B while the existing PC's will still stick to A due to the existing persistence entries already exist.

 

Before dst addr persistence or iRule even kicks in, we have to make sure that only ONE node is taking the traffic. How can we accomplish that? Only when this first step is accomplished then dst addr persistence or iRule will help.

 

ABOUT DEVCENTRAL

DevCentral NewsTechnical ForumTechnical ArticlesTechnical CrowdSRCCommunity GuidelinesDevCentral EULAGet a Developer Lab LicenseBecome a DevCentral MVP

RESOURCES

Product DocumentationWhite PapersGlossaryCustomer StoriesWebinarsFree Online CoursesF5 CertificationLearnF5 Training

SUPPORT

Manage SubscriptionsProfessional ServicesProfessional ServicesCreate a Service RequestSoftware DownloadsSupport Portal

PARTNERS

Find a Reseller PartnerTechnology AlliancesBecome an F5 PartnerLogin to Partner Central

F5 logo©2024 F5, Inc. All rights reserved.
TrademarksPoliciesPrivacyCalifornia PrivacyDo Not Sell My Personal Information