Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-6430 Upgrade JBoss Naming to 5.0.3.GA_CP01
  3. JBPAPP-6431

Delay in connecting when first of multiple providers is down can cause performance issue

    XMLWordPrintable

Details

    • Sub-task
    • Resolution: Done
    • Major
    • EAP_EWP 5.1.2 ER1
    • EAP_EWP 5.1.1
    • Naming
    • None
    • Release Notes
    • Hide
      A performance issue was identified in org.jnp.interfaces.NamingContext.checkRef, where every new InitialContext looped through the provider list in order. An unavailable node at the beginning of the provider list could cause a delay because it was waiting for a timeout before checking the next node. The fix adds an available JNDI Property (jnp.unorderedProviderList) and a system property (jboss.global.jnp.disableDiscovery). These properties change the initial JNDI server lookup order when multiple providers are used. Without the property (default), each provider is still tried in order on every new InitialContext. With the new property set, any existing connection to any provider is used before checking the provider list in order again.
      Show
      A performance issue was identified in org.jnp.interfaces.NamingContext.checkRef, where every new InitialContext looped through the provider list in order. An unavailable node at the beginning of the provider list could cause a delay because it was waiting for a timeout before checking the next node. The fix adds an available JNDI Property (jnp.unorderedProviderList) and a system property (jboss.global.jnp.disableDiscovery). These properties change the initial JNDI server lookup order when multiple providers are used. Without the property (default), each provider is still tried in order on every new InitialContext. With the new property set, any existing connection to any provider is used before checking the provider list in order again.
    • Documented as Resolved Issue
    • ON_QA

    Description

      org.jnp.interfaces.NamingContext.checkRef always loops through the provider list in order,
      trying to connect to the first before checking for a cached connection to a later provider.

      This affects performance because it can cause a delay on every context created, waiting for a timeout on a node that is down.

      For instance, the following takes a very long time when node1 is down.

      ...
      env.put ( Context.PROVIDER_URL, "node1:1100,node2:1100" );
      for ( int i = 0; i < 1000; ++ i )

      { InitialContext ctx = new InitialContext ( env ); ... }

      If checkRef looked for a cached connection to any of the listed providers before trying to connect to an uncached one,
      there would only be a timeout delay on the very first connection attempt.

      Attachments

        Issue Links

          Activity

            People

              rhn-support-dereed Dennis Reed
              rhn-support-dereed Dennis Reed
              Jared Morgan Jared Morgan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: