Middleware: Difference between revisions

From acumen Wiki
Jump to navigation Jump to search
Line 62: Line 62:
[[File:Redis ps output.png]]
[[File:Redis ps output.png]]


=== Checking the Redis Queues (Redis Commander - Web Interface) ===
=== Checking the Redis Queues (Web Interface) ===


Another method to confirm the state of the Redis Container is to scrutinise the information provided
Another method to confirm the state of the Redis Container is to scrutinise the information provided using [https://python-rq.org/docs/monitoring/ RQ Dashboard].

Revision as of 11:36, 7 July 2020

This page relates to the middleware components deployed to application servers.

Click here to learn more about middleware.

Database

Central to the application is the database server; acumen utilises a database server called MariaDB - the database server runs within its own Docker Container

Checking the container status

  • Start an ssh session to the relevant application server;
  • At the prompt, type the following commands:
  1. <user>@acumen-app-server:~$ cd ~/dockerise/
  2. <user>@acumen-app-server:~$ docker ps | grep "STATUS\|mysql"

The program will output information about the status of the container, for example:

Mariadb ps output.png

In the above example, we can observer that the STATUS of the container was created 12 days ago and has been 'Up' for 12 days, which indicates that there is no issue with the container.

Container logging

Where an issue with the database container has been observed then the Adminsitrator should check the logs:

  • Start an ssh session to the relevant application server;
  • At the prompt, type the following commands:
  1. <user>@acumen-app-server:~$ cd ~/dockerise/
  2. <user>@acumen-app-server:~$ docker-compose logs -f mysql"

This action will stream the logs to the terminal; observing this output for a short time should provide some indications to any potential issues.

Press [CTRL+C] to stop the logging output and return to the prompt.

Note: It is usual to see [Warning] entries within the container logs - if any entries are classified [Error] or [Critical], then please copy any errors and add to the issue ticket.

If the container is Down - then the following commands will bring the container back up:

  1. <user>@acumen-app-server:~$ cd ~/dockerise/
  2. <user>@acumen-app-server:~$ docker-compose up -d mysql"

Redis

The application server uses an in-memory key/value store called Redis - this is used to temporarily store information and data used by the application and to act as a low latency cache.

Numerous services across the application make use of Redis and it is therefore considered a critical service within the middleware group of services; without it, the application cannot run.

There are numerous ways to establish the health and status of the Redis service:

Checking the container status (command line)

  • Start an ssh session to the relevant application server;
  • At the prompt, type the following commands:
  1. <user>@acumen-app-server:~$ cd ~/dockerise/
  2. <user>@acumen-app-server:~$ docker ps | grep "STATUS\|redis"

The program will output information about the status of the container, for example:

Redis ps output.png

Checking the Redis Queues (Web Interface)

Another method to confirm the state of the Redis Container is to scrutinise the information provided using RQ Dashboard.