=head1 NAME

nbdkit-retry-request-filter - retry single requests on error

=head1 SYNOPSIS

 nbdkit --filter=retry-request PLUGIN
                   [retry-request-retries=N] [retry-request-delay=N]
                   [retry-request-open=false]

=head1 DESCRIPTION

C<nbdkit-retry-request-filter> is a filter for nbdkit that
transparently retries single requests if they fail.  This is useful
for plugins that are not completely reliable or have random behaviour.
For example L<nbdkit-curl-plugin(1)> might behave this way if pointed
at a load balancer which sometimes redirects to a web server that is
not responsive.

An alternative filter with different trade-offs is
L<nbdkit-retry-filter(1)>.  That filter is more heavyweight because it
always reopens the whole plugin connection on failure.

=head1 PARAMETERS

=over 4

=item B<retry-request-retries=>N

The number of times any single request will be retried before we give
up and fail the operation.  The default is 2.

=item B<retry-request-delay=>DELAY

The time to wait before retrying.  The default is 2 seconds.  Any
format supported by L<nbdkit_parse_delay(3)> is allowed here.

=item B<retry-request-open=false>

If set to false, do not retry opening the plugin.  The default is to
treat plugin open in the same way as other requests.

=back

=head1 FILES

=over 4

=item F<$filterdir/nbdkit-retry-request-filter.so>

The filter.

Use C<nbdkit --dump-config> to find the location of C<$filterdir>.

=back

=head1 VERSION

C<nbdkit-retry-filter> first appeared in nbdkit 1.30.

=head1 SEE ALSO

L<nbdkit(1)>,
L<nbdkit-filter(3)>,
L<nbdkit-readahead-filter(1)>,
L<nbdkit-retry-filter(1)>,
L<nbdkit_parse_delay(3)>.

=head1 AUTHORS

Richard W.M. Jones

=head1 COPYRIGHT

Copyright Red Hat
