Last modified by Erik Bakker on 2024/09/27 14:07

From version 28.80
edited by dfirdausy
on 2024/09/25 20:50
Change comment: There is no comment for this version
To version 18.1
edited by Erik Bakker
on 2024/03/01 13:28
Change comment: There is no comment for this version

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -Setting up Failover - Deploy Phase
1 +Flow Configuration
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.dfirdausy
1 +XWiki.ebakker
Content
... ... @@ -1,51 +1,106 @@
1 1  {{container}}
2 2  {{container layoutStyle="columns"}}
3 3  (((
4 +eMagiz flows, or more specifically, the flow's inbound component(s), can be grouped. The effect is that you can later in [[Deploy>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.Grouping and Failover.intermediate-grouping-and-failover-flow-configuration.WebHome||target="blank"]], control them as one entity. This is mainly beneficial when faced with substantial maintenance or outage of systems connected to your eMagiz model.
4 4  
5 -In the previous microlearning, we discussed what needs to be done in the Create phase to enable failover for systems that are configured to have them in the Design phase. Next to that, we also discussed that setting up this failover functionality in your model requires you to execute some steps in your Design, Create, and lastly Deploy phase. Picking up from what we have toggled in the Create phase, in this microlearning, we will focus on the steps and configurations that you have to make in the Deploy phase to activate the active/passive failover functionality.
6 +Building on this functionality, you can even configure the group to run in an active/passive failover mode when you activate the multiple runtimes option on your runtime, and each separate runtime is deployed on another machine. The failover functionality is not only relevant in cases of server maintenance. It can also assist you when you want to exchange data with a system that allows only one active connection. Should this connection be business-critical, you can use this failover functionality to create a passive failover situation that will take over when the active connection breaks down (regardless of the reason).
6 6  
8 +In this microlearning, we will focus on configuring the flow to group various inbound components and configure the flow (including the infra) if you want to activate the active/passive failover configuration.
9 +
7 7  Should you have any questions, please get in touch with [[academy@emagiz.com>>mailto:academy@emagiz.com]].
8 8  
9 9  == 1. Prerequisites ==
10 10  
11 -* Intermediate knowledge of the eMagiz platform.
14 +* Intermediate knowledge of the eMagiz platform
12 12  
13 13  == 2. Key concepts ==
14 14  
15 -This microlearning describes what configuration that you will have to do in the Deploy phase, based on what you have configured in the Design and Create phase, to enable failover for systems connecting with your model. The grouping and failover functionality is relevant when faced with maintenance and outages of systems connected to your model. The failover functionality assists in that case and allows you to have a fallback option on an active connection.
18 +This microlearning describes how to configure (parts of) your flow(s) to set up the grouping and, if needed, the failover functionality on the flow level. The grouping functionality is relevant when faced with maintenance and outages of systems connected to your model. The failover functionality assists in that case and allows you to have a fallback option on an active connection.
16 16  
17 -== 3. Deploy Phase Configuration ==
20 +== 3. Flow Configuration ==
18 18  
19 -== 3.1 Deploy Architecture ==
22 +== 3.1 Grouping ==
20 20  
21 -After finishing up your configuration in the Create phase, you can then move to your Deploy>Architecture. Here, you will see the new router containers, which we have seen in the Design>Architecture, to be added to your external machines. When you press "Start Editing" in this page, and then press "Apply to environment", you will be faced with a pop-up page that informs you that these router containers will be created for this specific environment as shown in the screenshot below.
24 +To configure grouping, we need to open the flow designer of the flow in Create. We want to edit and enter "Start Editing" mode. On the inbound component(s) in the flow, we now have an "Advanced" tab that allows you to configure the grouping information.
22 22  
23 -[[image:Main.Images.Microlearning.WebHome@grouping-and-failover--intermediate-grouping-and-failover-setting-up-failover-deploy-phase-router-containers.png]]
26 +[[image:Main.Images.Microlearning.WebHome@grouping-and-failover--intermediate-grouping-and-failover-flow-configuration-starting-point.png]]
24 24  
25 -Once you have applied the changes, when you go to the "Details" of each of those machines via right-clicking them, then you can find and set for each failover runtime the preferred machine to be the leader. As an example shown in the screenshot below, there are two runtimes that are enabled for failover and you can select whether that runtime running in that "External 01" machine is the preferred leader. Another option is to set the runtime that you select as the backup, or reset it back to "None" if you want. Next to that, notice that here you can find the "Internal IP address" and "Failover port" fields, which have been pre-filled in with property placeholders. We will comeback to these properties later in the following sections.
28 +{{info}}Note that the options above are available in all inbound components. The one chosen above is simply an illustration of how to configure.{{/info}}
26 26  
27 -[[image:Main.Images.Microlearning.WebHome@grouping-and-failover--intermediate-grouping-and-failover-setting-up-failover-deploy-phase-failover-preference.png]]
30 +Once on the "Advanced" tab, you must define the group name. You can determine the group name if this is the first flow you change. In all subsequent flows, you want to add to the same group, you must use the **same** group name.
28 28  
29 -When you have made your decision, and assuming that your machines are already deployed and running, then you can move to the other page discussed in the next section.
32 +[[image:Main.Images.Microlearning.WebHome@grouping-and-failover--intermediate-grouping-and-failover-flow-configuration-define-group-name.png]]
30 30  
31 -== 3.2 Deployment Plan ==
34 +Once filled in, ensure that the auto startup configuration is set to Yes to ensure that, on default, all flows within the group start up when the container is started.
32 32  
33 -If this is the first time that you configure your failover setup, then the next step in Deploy is to check the Deployment Plan. Here, you can add a deployment step called "Balance failover", which, when executed, will trigger the failover container(s) to be running on its preferred machine as you previously configured them in Deploy>Architecture. (Next to that, you can also find the "Group" deployment step. Discuss this step here.)
36 +[[image:Main.Images.Microlearning.WebHome@grouping-and-failover--intermediate-grouping-and-failover-flow-configuration-define-auto-startup.png]]
34 34  
35 -== 3.3 Deploy Release ==
38 +Within a runtime context, you can add multiple groups that can be stopped and started separately from each other. In this example, we would also like to have a group for our exits to stop them if the connecting system undergoes maintenance or is down to store the messages in the queue.
36 36  
37 -Once you have configured your Deployment Plan, then it is time to create a new release for your updated flows in the Deploy>Release page. As you might have noticed in the Deploy>Architecture earlier when opening the "Failover" tab in your machines' "Details", there are properties regarding the machines' "Internal IP address" and "Failover port". It is then becomes natural that you first need to fill in these property values in the environment that you are working on at the moment (i.e., Testing, Acceptance, Production). To do this, you can click the "wrench" icon on the right hand side beside the "Create phase" release and then press "New". In the pop-up presented to you, you can click the "Name" input field and then search for the property placeholder names that you saw earlier. Based on the example above, then you can search for {{code}}external01.failover.{{/code}} as shown in the example below.
40 +[[image:Main.Images.Microlearning.WebHome@grouping-and-failover--intermediate-grouping-and-failover-flow-configuration-starting-point-exit.png]]
38 38  
42 +[[image:Main.Images.Microlearning.WebHome@grouping-and-failover--intermediate-grouping-and-failover-flow-configuration-other-group.png]]
43 +
44 +== 3.2 Failover ==
45 +
46 +If you want to expand the grouping functionality to include an active/passive failover component, you need to change the settings on the inbound component. Apart from specifying the group name, you need to configure the auto-startup option on "No" so the failover configuration can take the correct actions in all situations.
47 +
48 +[[image:Main.Images.Microlearning.WebHome@grouping-and-failover--intermediate-grouping-and-failover-flow-configuration-failover-example-group.png]]
49 +
50 +[[image:Main.Images.Microlearning.WebHome@grouping-and-failover--intermediate-grouping-and-failover-flow-configuration-failover-other-group.png]]
51 +
52 +{{info}}Note that each group within a single runtime that you want to treat differently needs to have a **unique** name.{{/info}}
53 +
54 +== 3.3 Failover Infra ==
55 +
56 +The configuration of the infra flow of the runtime for which you want to configure the failover is detailed and only works if you configure all support objects correctly. Although we explain the various steps in the documentation, we advise utilizing the store item we created for this that will guide you in setting this up correctly.
57 +
58 +The configuration consists of at least three separate support objects. Two are needed once (infinispan cache manager and clustered lock registry), whereas the other is required per unique group you have defined within the context of your runtime. So, if you have two unique group names within the runtime, you need two leader initiator support objects.
59 +
60 +=== 3.3.1 Infinispan Cache Manager ===
61 +
62 +Given this, let us first look at the Infinispan cache manager. You can add this support object in the [[standard manner>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course Platform.crashcourse-platform-create-support-objects-introduction||target="blank"]] by searching for "infinispan cache manager."
63 +
64 +[[image:Main.Images.Microlearning.WebHome@grouping-and-failover--intermediate-grouping-and-failover-flow-configuration-cache-manager-search-result.png]]
65 +
66 +Once found, give it a name and fill in a cluster name.
67 +
68 +[[image:Main.Images.Microlearning.WebHome@grouping-and-failover--intermediate-grouping-and-failover-flow-configuration-cache-manager-basic.png]]
69 +
70 +Once done, switch to the "Advanced" tab, select the option "TCP Ping," and fill in the "Host address" and "Other host addresses". Once filled in, press Save to keep your changes.
71 +
72 +[[image:Main.Images.Microlearning.WebHome@grouping-and-failover--intermediate-grouping-and-failover-flow-configuration-cache-manager-advanced.png]]
73 +
74 +=== 3.3.2 Clustered Lock Registry ===
75 +
76 +Now that we have the cache manager, we can configure the next support object on our list, the clustered lock registry. You can add this support object in the [[standard manner>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course Platform.crashcourse-platform-create-support-objects-introduction.WebHome||target="blank"]] by searching for "lock registry."
77 +
78 +[[image:Main.Images.Microlearning.WebHome@grouping-and-failover--intermediate-grouping-and-failover-flow-configuration-lock-registry-search-result.png]]
79 +
80 +Once found, name it and select the cache manager support object you created.
81 +
82 +[[image:Main.Images.Microlearning.WebHome@grouping-and-failover--intermediate-grouping-and-failover-flow-configuration-lock-registry-basic.png]]
83 +
84 +=== 3.3.3 Leader Initiator ===
85 +
86 +Lastly, we need to configure a leader initiator for each **unique** group we have defined within the context of the runtime, and that uses the failover functionality. You can add this support object in the [[standard manner>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course Platform.crashcourse-platform-create-support-objects-introduction.WebHome||target="blank"]] by searching for "leader."
87 +
88 +[[image:Main.Images.Microlearning.WebHome@grouping-and-failover--intermediate-grouping-and-failover-flow-configuration-leader-initiator-search-result.png]]
89 +
90 +Once found, give it a name, define the role name (which should **exactly** match the name you gave in the inbound components), and link it to the lock registry.
91 +
92 +[[image:Main.Images.Microlearning.WebHome@grouping-and-failover--intermediate-grouping-and-failover-flow-configuration-leader-initiator-basic.png]]
93 +
39 39  == 4. Key takeaways ==
40 40  
41 -...
96 +* Grouping is beneficial when external systems go through maintenance or downtime.
97 +* Failover can have the additional benefit of having a fallback scenario while still adhering to the requirement that there can only be one active connection at a time
98 +* The role naming in both grouping and failover is crucial. The whole name needs to be matched fully to make it work.
99 +* For the infra configuration of the failover setup, we have a store item that you can use.
42 42  
43 43  == 5. Suggested Additional Readings ==
44 44  
45 -If you are interested in this topic and want more information, please read the help text provided by eMagiz and check out these links:
46 -
47 -* [[Failover (Search Results)>>url:https://docs.emagiz.com/bin/view/Main/Search?sort=score&sortOrder=desc&highlight=true&facet=true&r=1&f_space_facet=0%2FMain.&l_space_facet=10&f_type=DOCUMENT&f_locale=en&f_locale=&f_locale=en&text=%22Failover%22||target="blank"]]
48 -)))
103 +There are no suggested additional readings for this microlearning.)))
49 49  (((
50 50  {{toc/}}
51 51  )))