Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of about 10,000 for jitter (0.15 sec)

  1. pkg/kubelet/token/token_manager.go

    	jitter := time.Duration(rand.Float64()*maxJitter.Seconds()) * time.Second
    	if now.After(iat.Add(maxTTL - jitter)) {
    		return true
    	}
    	// Require a refresh if within 20% of the TTL plus a jitter from the expiration time.
    	if now.After(exp.Add(-1*time.Duration((*tr.Spec.ExpirationSeconds*20)/100)*time.Second - jitter)) {
    		return true
    	}
    	return false
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 10 10:20:09 UTC 2021
    - 6.1K bytes
    - Viewed (0)
  2. src/cmd/go/internal/lockedfile/lockedfile_plan9.go

    	// second open is attempted, it draws an error.”
    	//
    	// So we can try to open a locked file, but if it fails we're on our own to
    	// figure out when it becomes available. We'll use exponential backoff with
    	// some jitter and an arbitrary limit of 500ms.
    
    	// If the file was unpacked or created by some other program, it might not
    	// have the ModeExclusive bit set. Set it before we call OpenFile, so that we
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 2.5K bytes
    - Viewed (0)
  3. pkg/security/retry.go

    )
    
    var caLog = log.RegisterScope("ca", "ca client")
    
    // CARetryOptions returns the default retry options recommended for CA calls
    // This includes 5 retries, with backoff from 100ms -> 1.6s with jitter.
    var CARetryOptions = []retry.CallOption{
    	retry.WithMax(5),
    	retry.WithBackoff(wrapBackoffWithMetrics(retry.BackoffExponentialWithJitter(100*time.Millisecond, 0.1))),
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/util/wait/wait.go

    func Forever(f func(), period time.Duration) {
    	Until(f, period, NeverStop)
    }
    
    // Jitter returns a time.Duration between duration and duration + maxFactor *
    // duration.
    //
    // This allows clients to avoid converging on periodic behavior. If maxFactor
    // is 0.0, a suggested default value will be chosen.
    func Jitter(duration time.Duration, maxFactor float64) time.Duration {
    	if maxFactor <= 0.0 {
    		maxFactor = 1.0
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 14 19:14:11 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  5. pkg/kubeapiserver/options/authorization_test.go

    		WebhookCacheAuthorizedTTL:   60 * time.Second,
    		WebhookCacheUnauthorizedTTL: 30 * time.Second,
    		WebhookRetryBackoff: &wait.Backoff{
    			Duration: 500 * time.Millisecond,
    			Factor:   1.5,
    			Jitter:   0.2,
    			Steps:    5,
    		},
    	}
    
    	opts := NewBuiltInAuthorizationOptions()
    	pf := pflag.NewFlagSet("test-builtin-authorization-opts", pflag.ContinueOnError)
    	opts.AddFlags(pf)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 18 06:28:47 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  6. pkg/keepalive/options.go

    	// the connection is closed.
    	Timeout time.Duration
    	// MaxServerConnectionAge is a duration for the maximum amount of time a
    	// connection may exist before it will be closed by the server sending a GoAway.
    	// A random jitter is added to spread out connection storms.
    	// See https://github.com/grpc/grpc-go/blob/bd0b3b2aa2a9c87b323ee812359b0e9cda680dad/keepalive/keepalive.go#L49
    	MaxServerConnectionAge time.Duration // default value is infinity
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/plugin/pkg/audit/webhook/webhook_test.go

    	require.NoError(t, stdjson.NewEncoder(f).Encode(config), "writing kubeconfig")
    
    	retryBackoff := wait.Backoff{
    		Duration: 500 * time.Millisecond,
    		Factor:   1.5,
    		Jitter:   0.2,
    		Steps:    5,
    	}
    	b, err := NewBackend(f.Name(), groupVersion, retryBackoff, nil)
    	require.NoError(t, err, "initializing backend")
    
    	return b.(*backend)
    }
    
    func TestWebhook(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 08 06:37:26 UTC 2022
    - 3.9K bytes
    - Viewed (0)
  8. pkg/kubelet/pluginmanager/plugin_manager_test.go

    	}
    }
    
    func retryWithExponentialBackOff(initialDuration time.Duration, fn wait.ConditionFunc) error {
    	backoff := wait.Backoff{
    		Duration: initialDuration,
    		Factor:   3,
    		Jitter:   0,
    		Steps:    6,
    	}
    	return wait.ExponentialBackoff(backoff, fn)
    }
    
    func TestPluginRegistration(t *testing.T) {
    	defer cleanup(t)
    
    	pluginManager := newTestPluginManager(socketDir)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/ConnectionPool.kt

         */
        @JvmField val minimumConcurrentCalls: Int = 0,
        /** How long to wait to retry pre-emptive connection attempts that fail. */
        @JvmField val backoffDelayMillis: Long = 60 * 1000,
        /** How much jitter to introduce in connection retry backoff delays */
        @JvmField val backoffJitterMillis: Int = 100,
      )
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Wed Apr 03 20:39:41 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/util/webhook/webhook.go

    func DefaultRetryBackoffWithInitialDelay(initialBackoffDelay time.Duration) wait.Backoff {
    	return wait.Backoff{
    		Duration: initialBackoffDelay,
    		Factor:   1.5,
    		Jitter:   0.2,
    		Steps:    5,
    	}
    }
    
    // GenericWebhook defines a generic client for webhooks with commonly used capabilities,
    // such as retry requests.
    type GenericWebhook struct {
    	RestClient   *rest.RESTClient
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 20 19:02:55 UTC 2023
    - 6.3K bytes
    - Viewed (0)
Back to top