Is the High Availability of a system same as Availability in CAP Theorem?
I'm confused with the definition of things
In my view High Availability is the property of a system that aims to ensure an agreed level of operational performance and usually is expressed as a percentage of uptime in a given year.
On another side Availability in CAP theorem state that in a distributed system, reads and writes would always succeed even when network connectivity is unavailable between nodes.
Therefore I made the assumption that these two things are absolutely different.
If this true, could we say that the distributed system may be High Available and don't have a property of Availability in terms of CAP and vice versa?
See also questions close to this topic
-
Matching schema version when switching to GRDB
I am looking to use GRDB to access and manage a database originally created with Core Data. It has already been through a number of migrations, so I'm trying to figure out if it's possible for GRDB to pick up where Core Data left off.
It looks like GRDB stores applied migrations on a table called
grdb_migrations
. I have investigated the existing database, and it looks like the schema version might be stored in a table calledZ_METADATA
, although the only contents are a blob stored in a column calledZ_PLIST
which I am unable to read.- How can I determine the last applied migration of the database?
- Is it possible, using GRDB, to - on first launch - create an applied migrations table that matches where Core Data left it?
I know this is a complicated question, but any assistance or pointers would be appreciated.
-
Assist with MySql Query - Update based on select between tables
I've been hitting my head against the wall about this problem for the last 8 hours and I still can't find a solution.
This was my first post on stackoverflow, so sorry if I'm committing any kind of mistake writing this post.
Based on previous answers, I have to agree that CREAT VIEW might be a better and easier option than using UPDATE for my case.
I'll try to explain my problem:
Brief contextualization: I have a table with quality control results and another with the product specification. What I have to do, is to insert the specification in the results table row by row in order to make it easier for me to statistically treat a comparison between results and specs and plot charts. The main problem I encountered is that I have different specifications for the same product (they change over time) and because of that I have to insert different specifications in the result's table based on the result's date. For Example: Let's say I have two Specs date: 2020-01-01 and 2020-05-01 If I have a result on 2020-01-03 I have to insert in this result row the spec of the 2020-01-01. However, if the result date is 2020-05-02 I have to insert the spec from 2020-05-01. (always the newest specification which is older than the result date) I couldn't simply compare the two dates using WHERE results date > spec date because both spec's dates will be older then the result's date for the 2020-05-02.
Visual Example: MySQL version 8.0.23. (It supports PARTITION OVER and WITH)
TABLE "TABLE_A": Containing the results of the quality control
ID Date Result Product Spec 1 2020-01-01 24,5 ProductA 2 2020-01-02 25,5 ProductA 3 2020-01-03 31,4 ProductA 4 2020-01-01 24.3 ProductB 5 2020-01-02 30.4 ProductB 6 2020-01-03 41.4 ProductB Data Type: ID PrimaryKey Auto increment / Date as Date() / Results, Product and Specification as Varchar()
TABLE "TABLE_B": containing the required specification for each product - It can contain multiple rows for the same product since the specification can change over time.
ID Date Spec Product 1 2018-01-01 20.0 ProductA 2 2020-01-02 30.0 ProductA 3 2018-01-01 24.3 ProductA 4 2020-01-03 30.4 ProductA Data Type: ID PrimaryKey Auto increment / Date as Date() / Product and Specification as Varchar()
THE EXPECTED OUTCOME WOULD BE:
ID Date Result Product Spec 1 2020-01-01 24,5 ProductA 20.0 2 2020-01-02 25,5 ProductA 30.0 3 2020-01-03 31,4 ProductA 30.0 4 2020-01-01 24.3 ProductB 24.3 5 2020-01-02 30.4 ProductB 24.3 6 2020-01-03 41.4 ProductB 30.4 What I could come up with was the SELECT part, but it is only returning the Specs for the product that appears on both tables. I also needed to return NULL in case there is a product with results and yet no specification for it.
SELECT Table_C.Spec from Table_A LEFT JOIN (SELECT Product, Date, Spec from Table_B ORDER BY Date DESC) AS Table_C ON Table_C.Product=Table_A.Product WHERE Table_C.Date=( SELECT max(Table_B.Date) FROM Table_B WHERE Table_B.Date<Table_A.Date and Table_A.Product=Table_B.Product) ORDER BY Table_A.ID
I hope the example is easier to understand this time.
Thank you,
Diogo
-
How can I retrieve rows from mysql database and send them as JSON via Express.js?
I'm a complete beginner in Node.js and I want to send registered variable and claimed variable at the same time in the form of JSON via Express.js
This is the only thing I came up with right now and it does not even work.
app.get('/item_reg', (req, res) => { var registered = connection.query("SELECT JSON_OBJECT('name', item_name, 'item_id', item_id, 'location', location_desc, 'color', color, 'description', description, 'image', image_url) AS 'Registered' FROM Items_found WHERE type = 0"); var claimed = connection.query("SELECT JSON_OBJECT('name', item_name, 'item_id', item_id, 'location', location_desc, 'color', color, 'description', description, 'image', image_url) AS 'Claimed' FROM Items_found WHERE type = 1"); //sending a response res.json([[registered], [claimed]]); });
This is my DataBase but I only want some of the attributes as in the queries above not all of them.
Thank you in advance.
-
ColdFusion 2018 Standard 2 node cluster with J2EE shared sessions for failover
Why we want to configure that setup?
We would like to have a Blue/Green zero downtime setup for our CF2018 App.
We currently have a basic CF Server Install (IIS + CF2018) in one server that connects to another Server for the DB (we are using CF2018 Standard).
Our app uses J2EE sessions
There are posts that explain how to use the External Session Storage feature included in CF (redis) but that won’t work with J2EE sessions, the CF admin interface wont allow it.
How can I setup 2 servers in a cluster (behind a load balancer) with J2EE session failover functionality by using CF2018 Standard Edition?
-
Cassandra cluster vs cassandra ring
If I have one Cassandra cluster setup across 5 data centers (3 are private DCs) and 2 are Public (Azure DCs), can I say I have 5 rings or is this 1 cluster and 1 ring ?
Can someone help understanding the term "ring" in this context.
-
Hbase fail to create table in cloudera
I am beginner in Hadoop. I am facing a problem when I try to create a simple table in Hbase.These are following ERRORS.
21/02/26 11:36:38 ERROR client.ConnectionManager$HConnectionImplementation: Can't get connection to ZooKeeper: KeeperErrorCode = ConnectionLoss for /hbase
21/02/26 11:36:56 ERROR zookeeper.RecoverableZooKeeper: ZooKeeper exists failed after 4 attempts
21/02/26 11:36:56 ERROR zookeeper.ZooKeeperWatcher: hconnection-0x4844cdb60x0, quorum=quickstart.cloudera:2181, baseZNode=/hbase Received unexpected KeeperException, re-throwing exception - Distributed Messaging: Bus vs Broker
-
Do databases get deployed across regions (web app)?
In a multi-region web app, is it common to have the main user database in a single region or to replicate it across multiple regions and lose consistency?
-
Kafka based distributed scheduler
We have a use case wherein we are getting millions of events each day in Kafka. Each event would be like:
{"id": 123, "state": "start/in-transit/stop", "ts":"01-02-2021 12:00:00"}
So for each id we can have multiple events.
We need to generate alerts in case any one state has not been received for a particular id in a stream of these events after say xx days. Example for id 123 if we didn't receive in transit event after 5 days.
One way is to store everything in a data lake and run spark jobs continuously on top of it.
My question is: can we schedule jobs after xx days for each of these IDs and empower it using Kafka so that it becomes distributed.
Doing this we would not be continuously polling and checking if an alert condition is breached rather a job would be scheduled at a particular time for which we can query for the alert condition.
-
How to have highly available Moodle in Kubernetes?
Want to set up highly available Moodle in K8s (on-prem). I'm using Bitnami Moodle with helm charts.
After a successful Moodle installation, it becomes work. But when a K8s node down, Moodle web page displays/reverts/redirects to the Moodle installation web page. It's like a loop.
Persistence storage is rook-ceph. Moodle PVC is ReadriteMany where Mysql is ReadWriteOnce.
The following command was used to deploy Moodle.
helm install moodle --set global.storageClass=rook-cephfs,replicaCount=3,persistence.accessMode=ReadWriteMany,allowEmptyPassword=false,moodlePassword=Moodle123,mariadb.architecture=replication bitnami/moodle
Any help on this is appreciated.
Thanks.
-
High-Availability not working in Hadoop cluster
I am trying to move my non-HA namenode to HA. After setting up all the configurations for JournalNode by following the Apache Hadoop documentation, I was able to bring the namenodes up. However, the namenodes are crashing immediately and throwing the follwing error.
ERROR org.apache.hadoop.hdfs.server.namenode.NameNode: Failed to start namenode. java.io.IOException: There appears to be a gap in the edit log. We expected txid 43891997, but got txid 45321534.
I tried to recover the edit logs, initialize the shared edits etc., but nothing works. I am not sure how to fix this problem without formatting namenode since I do not want to loose any data.
Any help is greatly appreciated. Thanking in advance.
-
Apache Kafka Consume from Slave/ISR node
I understand the concept of master/slave and data replication in Kafka, but i don't understand why consumers and producers will always be routed to a master node when writing/reading from a partition instead of being able to read from any ISR (in-sync replica)/slave.
The way i think about it, if all consumers are redirected to one single master node, then more hardware is required to handle read/write operations from large consumer groups/producers.
Is it possible to read and write in slave nodes or the consumers/producers will always reach out to the master node of that partition?