+ All Categories
Home > Documents > Building Consistent and Highly Available Distributed Systems ......Java .NET C++ BI SELECT, UPDATE,...

Building Consistent and Highly Available Distributed Systems ......Java .NET C++ BI SELECT, UPDATE,...

Date post: 09-Aug-2020
Category:
Upload: others
View: 2 times
Download: 0 times
Share this document with a friend
17
© 2017 GridGain Systems, Inc. Building Consistent and Highly Available Distributed Systems with Apache Ignite and GridGain Valentin Kulichenko GridGain Lead Architect & Apache Ignite PMC
Transcript
Page 1: Building Consistent and Highly Available Distributed Systems ......Java .NET C++ BI SELECT, UPDATE, INSERT, MERGE, DELETE, CREATE and ALTER DDL, DML Support Cross-platform Compatibility

© 2017 GridGain Systems, Inc.

Building Consistent and Highly Available Distributed Systems

with Apache Ignite and GridGain

Valentin Kulichenko GridGain Lead Architect & Apache Ignite PMC

Page 2: Building Consistent and Highly Available Distributed Systems ......Java .NET C++ BI SELECT, UPDATE, INSERT, MERGE, DELETE, CREATE and ALTER DDL, DML Support Cross-platform Compatibility

© 2017 GridGain Systems, Inc.

• What is Ignite/GridGain? • Ignite/GridGain and CAP Theorem • High Availability in Ignite/GridGain • Cache Backups • Persistence • Data Center Replication • Data Snapshots (+Demo)

• Q&A

Agenda

Page 3: Building Consistent and Highly Available Distributed Systems ......Java .NET C++ BI SELECT, UPDATE, INSERT, MERGE, DELETE, CREATE and ALTER DDL, DML Support Cross-platform Compatibility

© 2017 GridGain Systems, Inc.

the in-memory computing platform that is durable, strongly consistent and highly available

with powerful SQL, key-value and processing APIs

Page 4: Building Consistent and Highly Available Distributed Systems ......Java .NET C++ BI SELECT, UPDATE, INSERT, MERGE, DELETE, CREATE and ALTER DDL, DML Support Cross-platform Compatibility

© 2017 GridGain Systems, Inc.

GridGain In-Memory Computing Platform

Secu

rity &

Aud

iting

Mon

itorin

g &

Man

agem

ent

Data

Sna

psho

ts &

Rec

over

y

Memory-Centric Storage

Ignite Native Persistence (Flash, SSD, Intel 3D XPoint)

Third-Party Persistence (RDBMS, HDFS, NoSQL)

SQL Transactions Compute Services MLStreamingKey/Value

IoTFinancial Services

Pharma & Healthcare

E-CommerceTravel & Logistics

Telco

Data

Cen

ter R

eplic

ation

Page 5: Building Consistent and Highly Available Distributed Systems ......Java .NET C++ BI SELECT, UPDATE, INSERT, MERGE, DELETE, CREATE and ALTER DDL, DML Support Cross-platform Compatibility

© 2017 GridGain Systems, Inc.

Data Grid

JCache Transactions Compute SQL

RDBMS

NoSQLHDFS

Server Node

Distributed Key-Value Store

Dynamic Scaling

Distributed partitioned hash map

ACID TransactionJCache & SQL

Server Node Server Node

3rd party storage caching

DURABLE MEMORY DURABLE MEMORY DURABLE MEMORY

Page 6: Building Consistent and Highly Available Distributed Systems ......Java .NET C++ BI SELECT, UPDATE, INSERT, MERGE, DELETE, CREATE and ALTER DDL, DML Support Cross-platform Compatibility

© 2017 GridGain Systems, Inc.

Distributed SQL

JDBC ODBC SQL API

Java .NET C++ BI

SELECT, UPDATE, INSERT, MERGE, DELETE, CREATE and ALTER

DDL, DML Support

Cross-platform Compatibility

Indexes in RAM or Disk

Dynamic Scaling

Server Node Server NodeServer Node

Apache Ignite Cluster

DURABLE MEMORY DURABLE MEMORY DURABLE MEMORY

Tools

Page 7: Building Consistent and Highly Available Distributed Systems ......Java .NET C++ BI SELECT, UPDATE, INSERT, MERGE, DELETE, CREATE and ALTER DDL, DML Support Cross-platform Compatibility

© 2017 GridGain Systems, Inc.

GridGain and CAP Theorem

CA?P

• CAP • Consistency (C) • Availability (A) • Partition Tolerance (P) • Impossible: CAP • Most of distributed systems are CP or AP

• GridGain • Strongly CP • But still highly available?

Page 8: Building Consistent and Highly Available Distributed Systems ......Java .NET C++ BI SELECT, UPDATE, INSERT, MERGE, DELETE, CREATE and ALTER DDL, DML Support Cross-platform Compatibility

© 2017 GridGain Systems, Inc.

Cache Backups

Ignite Node

AC

DB

Ignite Node

BA

CD

Ignite Node

CD

BA

Ignite Node

DB

AC

Page 9: Building Consistent and Highly Available Distributed Systems ......Java .NET C++ BI SELECT, UPDATE, INSERT, MERGE, DELETE, CREATE and ALTER DDL, DML Support Cross-platform Compatibility

© 2017 GridGain Systems, Inc.

Rack Safety: Problem

Ignite Node

Switch

Ignite Node

Ignite Node

Switch

Ignite Node

A C

B A

C D

D B

Partition A is lost!

Client

Page 10: Building Consistent and Highly Available Distributed Systems ......Java .NET C++ BI SELECT, UPDATE, INSERT, MERGE, DELETE, CREATE and ALTER DDL, DML Support Cross-platform Compatibility

© 2017 GridGain Systems, Inc.

Rack Safety: Solution

<property name="userAttributes"><map>

<entry key="rack" value="rack-1"/></map>

</property>

• Assign attribute to each node:

• Implement affinity backup filter:public class RackFilter implements IgniteBiPredicate<ClusterNode, List<ClusterNode>> {

@Override public boolean apply(ClusterNode candidate, List<ClusterNode> assigned) {String candidateRack = candidate.attribute("rack");String primaryRack = assigned.get(0).attribute("rack");

return !Objects.equals(candidateRack, primaryRack);}

}

Page 11: Building Consistent and Highly Available Distributed Systems ......Java .NET C++ BI SELECT, UPDATE, INSERT, MERGE, DELETE, CREATE and ALTER DDL, DML Support Cross-platform Compatibility

© 2017 GridGain Systems, Inc.

Rack Safety: Solved!

Ignite Node

Switch

Ignite Node

Ignite Node

Switch

Ignite Node

A D

B C

C A

D B

No partitions lost

Client

Page 12: Building Consistent and Highly Available Distributed Systems ......Java .NET C++ BI SELECT, UPDATE, INSERT, MERGE, DELETE, CREATE and ALTER DDL, DML Support Cross-platform Compatibility

© 2017 GridGain Systems, Inc.

Persistence

Ignite NodeIgnite NodeIgnite Node

Ignite Cluster

RDBMS

NoSQL

HDFS

Page 13: Building Consistent and Highly Available Distributed Systems ......Java .NET C++ BI SELECT, UPDATE, INSERT, MERGE, DELETE, CREATE and ALTER DDL, DML Support Cross-platform Compatibility

© 2017 GridGain Systems, Inc.

Durable Memory

Off-heap Removes noticeable GC pauses

Automatic Defragmentation

Stores Superset of Data

Predictable memory consumption

Fully Transactional (Write-Ahead Log)

DURABLE MEMORY DURABLE MEMORY DURABLE MEMORY

Server Node Server Node Server Node

Ignite Cluster

Instantaneous Restarts

Page 14: Building Consistent and Highly Available Distributed Systems ......Java .NET C++ BI SELECT, UPDATE, INSERT, MERGE, DELETE, CREATE and ALTER DDL, DML Support Cross-platform Compatibility

© 2017 GridGain Systems, Inc.

Ignite Native Persistence

1. Update

RAM

2. Persist

Write-Ahead Log

Partition File 13. Ack

4. Checkpointing

Partition File N

Server Node

Page 15: Building Consistent and Highly Available Distributed Systems ......Java .NET C++ BI SELECT, UPDATE, INSERT, MERGE, DELETE, CREATE and ALTER DDL, DML Support Cross-platform Compatibility

© 2017 GridGain Systems, Inc.

GridGain Data Center Replication

Active-Passive Replication for

Disaster Recovery Split-Brain Resolution

Active-Active Bi-Directional

Replication

DC1 DC2

DC3

DC5

DC4

Page 16: Building Consistent and Highly Available Distributed Systems ......Java .NET C++ BI SELECT, UPDATE, INSERT, MERGE, DELETE, CREATE and ALTER DDL, DML Support Cross-platform Compatibility

© 2017 GridGain Systems, Inc.

Data Snapshots & Recovery

External Store

Backup

Restore

Full & Incremental Backups

Managed Backup Schedules

GridGain Cluster

DURABLE MEMORY DURABLE MEMORY DURABLE MEMORY

Server Node Server Node Server Node

Data & Indexes

Page 17: Building Consistent and Highly Available Distributed Systems ......Java .NET C++ BI SELECT, UPDATE, INSERT, MERGE, DELETE, CREATE and ALTER DDL, DML Support Cross-platform Compatibility

© 2017 GridGain Systems, Inc.

Any Questions?Thank you for joining us. Follow the conversation.

http://ignite.apache.org

@apacheignite @vkulichenko


Recommended