Keycloak
79 строк · 3.0 Кб
1<#import "/templates/guide.adoc" as tmpl>
2<#import "/templates/links.adoc" as links>
3
4<@tmpl.guide
5title="Recover from an out-of-sync passive site"
6summary="This describes the automatic and operational procedures necessary" >
7
8This {section} describes the procedures required to synchronize the secondary site with the primary site in a setup as outlined in <@links.ha id="concepts-active-passive-sync" /> together with the blueprints outlined in <@links.ha id="bblocks-active-passive-sync" />.
9
10include::partials/infinispan/infinispan-attributes.adoc[]
11
12// used by the CLI commands to avoid duplicating the code.
13:stale-site: secondary
14:keep-site: primary
15:keep-site-name: {site-a-cr}
16:stale-site-name: {site-b-cr}
17
18== When to use procedure
19
20Use this after a temporary disconnection between sites where {jdgserver_name} was disconnected and the contents of the caches are out-of-sync.
21
22At the end of the procedure, the session contents on the secondary site have been discarded and replaced by the session contents of the primary site.
23All caches in the secondary site have been cleared to prevent invalid cached contents.
24
25See the <@links.ha id="introduction" /> {section} for different operational procedures.
26
27== Procedures
28
29=== {jdgserver_name} Cluster
30
31For the context of this {section}, `{site-a}` is the primary site and is active, and `{site-b}` is the secondary site and is passive.
32
33Network partitions may happen between the site and the replication between the {jdgserver_name} cluster will stop.
34These procedures bring both sites back in sync.
35
36WARNING: Transferring the full state may impact the {jdgserver_name} cluster performance by increasing the response time and/or resources usage.
37
38The first procedure is to delete the stale data from the secondary site.
39
40. Login into your secondary site.
41
42. Shutdown {project_name}.
43This will clear all {project_name} caches, and it prevents the state of {project_name} from being out-of-sync with {jdgserver_name}.
44+
45When deploying {project_name} using the {project_name} Operator, change the number of {project_name} instances in the {project_name} Custom Resource to 0.
46
47<#include "partials/infinispan/infinispan-cli-connect.adoc" />
48
49include::partials/infinispan/infinispan-cli-clear-caches.adoc[]
50
51Now we are ready to transfer the state from the primary site to the secondary site.
52
53. Login into your primary site
54
55<#include "partials/infinispan/infinispan-cli-connect.adoc" />
56
57include::partials/infinispan/infinispan-cli-state-transfer.adoc[]
58
59As now the state is available in the secondary site, {project_name} can be started again:
60
61. Login into your secondary site.
62
63. Startup {project_name}.
64+
65When deploying {project_name} using the {project_name} Operator, change the number of {project_name} instances in the {project_name} Custom Resource to the original value.
66
67=== AWS Aurora Database
68
69No action required.
70
71=== Route53
72
73No action required.
74
75== Further reading
76
77See <@links.ha id="concepts-infinispan-cli-batch" /> on how to automate Infinispan CLI commands.
78
79</@tmpl.guide>
80