Post on 15-Apr-2017
LOGISTICS AND INTRODUCTIONS
Christina WongDirector of Product Marketing
2
Boris BulanovVice President of Technology
+ All attendees are muted
+ Submit questions in the Q&A box on the right
+ Webinar is being recorded and will be available for replay
POSSIBLE COMPROMISES 4
Traditional NoSQL Cloud Other NewSQL
Familiar development (ANSI SQL)
Maintain business database of record
Straightforward to elastically scale
Fast data access for the app
Continuous availability
Simple migration
Deployment flexibility
WHAT’S NEEDED FOR CLOUD SUCCESS?
5
Virtualization, Commodity & Cloud Scale out / in ACID
(consistency)Existing SQLskills & code
SQL database abstraction
What everyone wants: What they don’t want to lose
“Elasticity” “SQL”
“I want to elastically scale my SQL RDBMS to the cloud”
ContinuousAvailability
6NUODB, THE ELASTIC SQL DATABASE
Separate the application, transactions, and storage for elastic scalability
In-memory transactions+ Working data set+ No shards / explicit partitioning+ Scale throughput & clients
on-demand
Redundant, flexible storage+ Durable persistence+ Automatically replicate
to multiple locations+ Storage management
independent of performance considerations
One logical database+ Both tiers survive failures
and rolling upgrades at any peer+ Allocate servers based on workload
PROCESS+ Introduction+ Install+ Manage+ Run+ Survive
TOPICSTAKE-AWAYS+ Simplicity
Dynamic configuration and management
+ Capacity on-demand Elastic scale-out
+ Resilience No single point of failure
TETE TE
SM SM
NuoDB ARCHITECTURE IN PRACTICE
Nuo
DB d
atab
ase
App App App
+ Fully redundant+ Elastically scalable+ Continuously available
Available host
SM Storage Manager (SM)
Transaction Engine (TE)TE
Scale-out adds
+ Active/Active across single DC or multiple AZ’s
CE SAMPLE DEPLOYMENT TOPOLOGY
10
Host-0
Host-1
Host-2
Host-3
Host-4
B1
B2
B3
B4
SM1
Journal
Archive
AP1 TE2
TE1
TE2
1. INSTALL – PROVISION HOSTS+ Provisioning hosts
Prepare• Machines are properly networked (for AWS see Appendix A)• Install on each host – see CE blog at http://www.nuodb.com/ce-tech-blog • Modify host configuration $ sudo vi /opt/nuodb/etc/default.properties
• domainPassword = bird• peer = (SEE NEXT SLIDE)
Start Brokers $ sudo /opt/nuodb/etc/nuoagent start
Check Brokers$ /opt/nuodb/bin/nuodbmgr –-broker localhost –password birdnuodb [domain] > show domain summary
11
1. INSTALL – CONFIGURE BROKERS
12
Host-0
Host-1
Host-2
Host-3
Host-4
B1
B2
B4
B3
peer =
peer = host-1
peer = host-1
peer = host-1
1. INSTALL – START DATABASE + Start Database
Create directory for database archive – ex. /home/ubuntu/dbs Start SMnuodb [domain] > start process sm archive /home/ubuntu/dbs host host-4 database hockey initialize true Start TEsnuodb [domain] > start process te host host-1 database hockey options '--dba-user dba --dba-password dba'nuodb [domain] > start process te host host-2 database hockey options '--dba-user dba --dba-password dba'nuodb [domain] > start process te host host-3 database hockey options '--dba-user dba --dba-password dba'
Pay attention to non-specified default parameters:• Commit – local (default) or remote – flexible commit protocol• Memory – 2GB (default) – garbage collection trigger
13
1. INSTALL – POPULATE DATABASE+ Populate Database
$ /opt/nuodb/bin/nuosql hockey@localhost --user dba --password dba --file /opt/nuodb/samples/quickstart/sql/create-db.sql
$ /opt/nuodb/bin/nuosql hockey@localhost --user dba --password dba --file /opt/nuodb/samples/quickstart/sql/Teams.sql
$ /opt/nuodb/bin/nuosql hockey@localhost --user dba --password dba --file /opt/nuodb/samples/quickstart/sql/Players.sql
$ /opt/nuodb/bin/nuosql hockey@localhost --user dba --password dba --file /opt/nuodb/samples/quickstart/sql/Scoring.sql
14
1. INSTALL – PROVISIONED DATABASE
15
Host-0
Host-1
Host-2
Host-3
Host-4
B1
B2
B3
B4
TE2
TE1
TE3
SM1
Journal
Archive
2. MANAGE – DOMAIN AND SYSTEM + DOMAIN - NuoDB Manager Utility
$ /opt/nuodb/bin/nuodbmgr –-broker localhost –password birdnuodb [domain] > show domain healthnuodb [domain] > show host properties host localhost
+ SYSTEM - NuoSQL client$ /opt/nuodb/bin/nuosql hockey –-user dba –-password dbaSQL> select sqlstring, connid, nodeid from
system.connections where handle = 1;
SQL> select id, address, type, triptime from system.nodes;
16
2. MANAGE – ENGINES AND SQL+ ENGINES – Monitoring
$ /opt/nuodb/bin/nuodbmgr –-broker localhost --password bird --command "monitor domain"
+ SQL – Monitoring$ /opt/nuodb/bin/nuodbmgr --broker localhost --password bird --command "log database hockey categories sql-statements"
17
3. RUN – COMPILE AND START + Compile
$ javac -cp /opt/nuodb/jar/nuodbjdbc.jar SimpleDriver.java
20
Feb:12:19:37:14; work=1282.01op/s; time=4999.97; ave latency=2.05ms; ave tx=22.14msFeb:12:19:37:19; work=1302.05op/s; time=10007.28; ave latency=2.04ms; ave tx=21.82msFeb:12:19:37:24; work=1315.21op/s; time=15001.44; ave latency=2.02ms; ave tx=21.61msFeb:12:19:37:29; work=1316.48op/s; time=20007.94; ave latency=2.03ms; ave tx=21.59msFeb:12:19:37:34; work=1320.34op/s; time=25008.73; ave latency=2.02ms; ave tx=21.54msFeb:12:19:37:39; work=1322.23op/s; time=30009.95; ave latency=2.02ms; ave tx=21.50msFeb:12:19:37:44; work=1322.23op/s; time=30009.95; ave latency=2.02ms; ave tx=21.50msFeb:12:19:37:44; Total statements=39,680; elapsed=30009.95ms (sleep=1404.909ms); rows=0; rate=1322.23op/s; ave latency=2.02ms; ave tx=21.50ms;
+ Run$ java -cp ./:/opt/nuodb/jar/nuodbjdbc.jar SimpleDriver -url jdbc:com.nuodb://localhost/hockey -user dba -password dba -threads 3 -time 60 -report 5 -batch 10
4. SURVIVE - THE FAILURE SCENARIO
21
Host-0
Host-1
Host-2
Host-3
Host-4
B1
B2
B3
B4
AP1 TE2
TE1
TE3
SM1
Journal
Archive
+ 1. Check Domain$ /opt/nuodb/bin/nuodbmgr –-broker localhost –password birdnuodb [domain] > show domain summaryDatabase: hockey, (unmanaged), processes [3 TE, 1 SM], ACTIVE
[TE]172.31.19.9:48005 [ pid = 6495 ] [ nodeId = 9 ] RUNNING
[TE]172.31.26.217:48005 [ pid = 7232 ] [ nodeId = 11 ] RUNNING
[SM]127.0.0.1:48005 [ pid = 1917 ] [ nodeId = 1 ] RUNNING
[TE]172.31.29.177:48005 [ pid = 7609 ] [ nodeId = 8 ] RUNNING
+ 3. Kill TEnuodb [domain] > shutdown processHost: host-2Process ID: 6495 Process shutdown cleanly
4. SURVIVE - START+ 2. Check connections$ /opt/nuodb/bin/nuosql hockey –-user dba –-password dbaSQL> select sqlstring, nodeid, connid from system.connections;
SQLSTRING NODEID CONNID ------------------------------------------- ------- -------
SELECT * from User.Teams WHERE year < ? 9 22 SELECT * from User.Teams WHERE year < ? 9 23 9 24 select sqlstring, nodeid, connid from 9 25 SELECT * from User.Teams WHERE year < ? 11 9 11 10 11 11 11 12 8 25 SELECT * from User.Teams WHERE year < ? 8 26 8 27
22
+ 4. Observe Client Application (change time parameter)$ java -cp ./:/opt/nuodb/jar/nuodbjdbc.jar SimpleDriver -url jdbc:com.nuodb://localhost/hockey -user dba -password dba -threads 3 -time 1000 -report 5 -batch 10
INFO: Feb:10:16:17:14; work=1342.00op/s; ave latency=2.12msINFO: Feb:10:16:17:19; work=1342.00op/s; ave latency=2.12msINFO: Feb:10:16:17:24; work=1342.00op/s; ave latency=2.12msINFO: Feb:10:16:17:29; work=1343.00op/s; ave latency=2.12msINFO: Feb:10:16:17:34; work=1344.00op/s; ave latency=2.11msINFO: Feb:10:16:17:37; Communication failed with TE failing over... java.sql.SQLTransientConnectionException: End of stream reachedINFO: Feb:10:16:17:37; Communication failed with TE failing over... java.sql.SQLTransientConnectionException: End of stream reachedINFO: Feb:10:16:17:37; Communication failed with TE failing over… java.sql.SQLTransientConnectionException: End of stream reachedINFO: Feb:10:16:17:39; work=1344.00op/s; ave latency=2.11msINFO: Feb:10:16:17:44; work=1342.00op/s; ave latency=2.12msINFO: Feb:10:16:17:49; work=1341.00op/s; ave latency=2.12ms
4. SURVIVE - CONTINUE+ 5. Check connections$ /opt/nuodb/bin/nuosql hockey –-user dba –-password dbaSQL> select sqlstring, nodeid, connid from system.connections;
SQLSTRING NODEID CONNID ----------------------------------------- ------- ------- select sqlstring, nodeid, connid from system 8 28 8 29 SELECT * from User.Teams WHERE year < ? 8 30 8 31 SELECT * from User.Teams WHERE year < ? 8 32 8 33 11 13 11 14 11 15 SELECT * from User.Teams WHERE year < ? 11 16 11 17
23
PROCESS+ Install+ Manage+ Run+ Survive
SUMMARYTAKE-AWAYS+ Simplicity
Dynamic configuration and management
+ Capacity on-demand Elastic scale-out
+ Resilience No single point of failure
+ Get started! These Slides
• To be sent following webinar TechBlog Post w/installation
details• www.nuodb.com/ce-tech-blog
GitHub Repository with samples• www.nuodb.com/github-getting-
started
QUESTIONS & NEXT STEPS+ Upgrade for more robust
features! Jump Start program (for start-ups)
• Free, fully redundant development database (2 TEs : 2 SMs)
• www.nuodb.com/jump-start Request evaluation
• www.nuodb.com/evaluating-nuodb Upgrade to Professional or
Enterprise Edition• www.nuodb.com/contact-sales
25
APPENDIX A – AWS CONFIGURATION
26
+ Recommended EC2 types t2.micro
• brokers only, experimenting t2.large
• development, functional test r4.xlarge for TE
• performance benchmarking with best memory per $
r3.xlarge for SM • performance benchmarking with
best SSD per $ r4.xlarge/r3.xlarge and higher
• production systems
+ Open ports in Security Groups NuoDB default port range – 48004 – 49000 Example: