summaryrefslogtreecommitdiffstats
path: root/docs/sections/services/heartbeat-ms/architecture.rst
diff options
context:
space:
mode:
authorPrakashH <pbhandar@techmahindra.com>2019-01-22 08:19:43 +0000
committerPrakashH <pbhandar@techmahindra.com>2019-01-22 08:19:43 +0000
commit3bcb00f79c6bacc5c1ed3c3c2fd7642992707f23 (patch)
treeb33ec120837287faa54b8bacbee64de8ae21fcc8 /docs/sections/services/heartbeat-ms/architecture.rst
parent6c93a7444773177d9bad86e720ba7966061973df (diff)
Heartbeat Microservice User Documentation
User Documentation for heartbeat Microservice Issue-ID: DCAEGEN2-280 Change-Id: I158680b11b5d5de4a0d58f4d2f03816e2b1941fc Signed-off-by: PrakashH <pbhandar@techmahindra.com>
Diffstat (limited to 'docs/sections/services/heartbeat-ms/architecture.rst')
-rw-r--r--docs/sections/services/heartbeat-ms/architecture.rst47
1 files changed, 47 insertions, 0 deletions
diff --git a/docs/sections/services/heartbeat-ms/architecture.rst b/docs/sections/services/heartbeat-ms/architecture.rst
new file mode 100644
index 00000000..f97fa24c
--- /dev/null
+++ b/docs/sections/services/heartbeat-ms/architecture.rst
@@ -0,0 +1,47 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+.. _architecture:
+
+High-level architecture of Heartbeat Microservice
+=================================================
+
+**Heartbeat Microservice**’s startup script (misshtbtd.py) gets the
+configuration from CBS and parses these entries and saves them in the
+postgres database having table name **vnf_table_1**. Each entry in the
+configuration is for a particular eventName. Each entry has missed
+heartbeat count, heartbeat interval, Control loop name etc. along with
+many other parameters.
+
+Whenever a heartbeat event is received, the sourceName, lastEpochTime
+and other information is stored in another postgres database having
+table name **vnf_table_2**. It is designed to process the heartbeat event
+having different sourceNames having same eventName. In such case,
+sourceName count is maintained in vnf_table_1 which would give number of
+SouceNames that have same eventName. As and when new sourceName is
+received, sourceName count is incremented in vnf_table_1
+
+The heartbeat Microservice is designed to support multiple instances of
+HB Microservice to run simultaneously. The first instance of the HB
+Microservice would assume the role of active instance, and instances
+that started running later would become inactive instances. If the
+active HB microservice is not responding or killed, the inactive HB
+instance would take over the active role. To achieve this functionality,
+one more postgres table **hb_common** is introduced which has parameters
+specific to active instances such as process id/hostname of the active
+instance, last accessed time updated by active instance.
+
+Heartbeat Microservice supports the periodic download of CBS
+configuration. The periodicity of download can be configured.
+
+Heartbeat Microservice also supports the download of CBS configuration
+whenever configuration changes. Here Docker container would call the
+function/method to download the CBS configuration.
+
+The heartbeat microservice has 2 states
+
+**Reconfiguration state**– Download configuration from CBS and update
+the vnf_table_1 is in progress.
+
+**Running state** – Normal working that comprises of receiving of HB
+events and sending of control loop event if required conditions are met.