Apache-Session-Browseable
view release on metacpan or search on metacpan
lib/Apache/Session/Browseable/Patroni.pm view on Meta::CPAN
# SSL options (verification enabled by default):
# PatroniVerifySSL => 1, # Verify SSL certificates (default: 1)
# PatroniSSLCAFile => '/path/to/ca.pem', # Custom CA file
# PatroniSSLCAPath => '/path/to/certs/', # Custom CA directory
};
# Use it like L<Apache::Session::Browseable::PgJSON>
=head1 DESCRIPTION
Apache::Session::Browseable provides some class methods to manipulate all
sessions and add the capability to index some fields to make research faster.
Apache::Session::Browseable::Patroni implements it for PostgreSQL databases
using "json" or "jsonb" type to be able to browse sessions and is able to dial
directly with Patroni API to find the master node of PostgreSQL cluster in
case of error.
=head2 Resilience features
=over 4
=item * B<Circuit breaker>: Avoids hammering the Patroni API when it's failing.
After a failure, the API won't be queried again for C<PatroniCircuitBreakerDelay>
seconds (default: 30).
=item * B<Leader caching>: The discovered leader is cached for
C<PatroniCacheTTL> seconds (default: 60). This cache is used as fallback when
the API is unavailable.
=item * B<Split-brain detection>: Refuses to use a cluster that reports
multiple leaders.
=item * B<Leader health check>: Verifies that the leader is in "running" state
before using it.
=item * B<Multi-source support>: Each DataSource maintains its own independent
cache, allowing multiple Patroni clusters to be used simultaneously.
=back
=head2 SSL/TLS Configuration
By default, SSL certificate verification is B<enabled> when connecting to
HTTPS Patroni endpoints. This protects against man-in-the-middle attacks.
Available SSL options:
=over 4
=item * C<PatroniVerifySSL> (default: 1)
Set to 0 to disable SSL certificate verification. B<Warning>: This makes
HTTPS connections vulnerable to MITM attacks. Only use in development or
when you have other network-level protections.
PatroniVerifySSL => 0, # INSECURE - disable SSL verification
=item * C<PatroniSSLCAFile>
Path to a custom CA certificate file (PEM format) for verifying the Patroni
API server certificate.
PatroniSSLCAFile => '/etc/ssl/certs/patroni-ca.pem',
=item * C<PatroniSSLCAPath>
Path to a directory containing CA certificates for verification.
PatroniSSLCAPath => '/etc/ssl/certs/',
=back
=head1 SEE ALSO
L<http://lemonldap-ng.org>, L<Apache::Session::Browseable::PgJSON>
=head1 COPYRIGHT AND LICENSE
=encoding utf8
=over
=item 2009-2025 by Xavier Guimard
=item 2013-2025 by Clément Oudot
=item 2019-2025 by Maxime Besson
=item 2013-2025 by Worteks
=item 2023-2025 by Linagora
=back
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.10.1 or,
at your option, any later version of Perl 5 you may have available.
=cut
( run in 0.740 second using v1.01-cache-2.11-cpan-63c85eba8c4 )