Download presentation
Presentation is loading. Please wait.
Published byLionel Bailey Modified over 9 years ago
1
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 1 : Flexible Database Clustering Middleware Emmanuel Cecchet – INRIA Julie Marguerite – ObjectWeb Willy Zwaenepoel – EPFL
2
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 2 Internet Database tier should be –scalable –highly available –without modifying the client application –database vendor independent –on commodity hardware Motivations JDBC
3
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 3 Scaling the database tier – Alternative 1 (master-slave) Internet Web frontend App. server Cons –failover time on master failure –scalability Master
4
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 4 Scaling the database tier – Alternative 2 (SMP) Internet Web frontend App. server Well-known database vendor here Database Well-known hardware + database vendors here Cons –Cost –Scalability limit
5
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 5 Scaling the database tier – Alternative 3 (shared disks) Internet Web frontend App. server Database Disks Another well-known database vendor Cons –still expensive hardware –availability
6
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 6 Outline C-JDBC architecture High availability Use cases Conclusion
7
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 7 architectural overview JVM Application server MySQL JDBC driver MySQL database JVM C-JDBC JDBC driver C-JDBC controller JVM
8
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 8 basic concepts JVM 2 components –C-JDBC driver –C-JDBC controller –100% Java implementation Read-one, Write all approach Tunable replication –full partitioning –full replication –partial replication
9
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 9 Functional overview connect myDB connect login, password execute SELECT * FROM t
10
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 10 Functional overview execute INSERT INTO t …
11
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 11 Outline C-JDBC architecture High availability Use cases Conclusion
12
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 12 Failures No 2 phase- commit –parallel transactions –failed nodes are automatically disabled execute INSERT INTO t …
13
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 13 Restoring a backend Updates stored in the recovery log Database dumps associated to checkpoints
14
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 14 Synchronization Replay missing updates from log
15
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 15 Healed Cluster Re-enable backend when done
16
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 16 Vertical scalability Addresses JVM scalability issues Distributing large number of connections on many backends
17
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 17 Controller replication Prevent the controller from being a single point of failure Group communication for controller synchronization
18
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 18 Controller replication jdbc:cjdbc://node1,node2/myDB Total order reliable multicast
19
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 19 Mixing horizontal & vertical scalability
20
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 20 Current limitations Replication granularity is table No distributed joins Network partition with replicated controllers JDBC only –support of PHP, Perl, ODBC through wrappers or bridges –partial support of JDBC 3.0
21
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 21 Other features SSL support Support for heterogeneous databases SQL monitoring JMX based administration console Request player
22
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 22 Outline C-JDBC architecture High availability Use cases Conclusion
23
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 23 Budget High Availability High availability infrastructure “on a budget” Typical eCommerce setup http://www.budget-ha.com
24
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 24 OpenUSS: University Support System eLearning High availability Portability –Linux, HP-UX, Windows –InterBase, Firebird, PostgreSQL, HypersonicSQL http://openuss.sourceforge.net
25
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 25 Flood alert system Disaster recovery Independent nodes synchronized with C-JDBC VPN for security issues http://floodalert.org
26
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 26 J2EE benchmarking Large scale J2EE clusters http://jmob.objectweb.org Interne t emulated users
27
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 27 Outline C-JDBC architecture High availability Use cases Conclusion
28
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 28 Conclusion C-JDBC: Flexible Database Clustering Middleware –scalable –highly available –without modifying the client application –database vendor neutral –on commodity hardware LPGL software hosted by ObjectWeb
29
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 29 Q&A _________ Thanks to all users and contributors... http://c-jdbc.objectweb.org
30
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 30 TPC-W benchmark (Amazon.com) Nearly linear speedups with the shopping mix
31
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 31 Result cache Cache contains a list of SQL->ResultSet Policy defined by queryPattern->Policy 3 policies –EagerCaching: variable granularities for invalidations –RelaxedCaching: invalidations based on timeout –NoCaching: never cached RUBiS bidding mix with 450 clients No cacheCoherent cache Relaxed cache Throughput (rq/min)389241844215 Avg response time801 ms284 ms134 ms Database CPU load100%85%20% C-JDBC CPU load-15%7%
32
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 32 Recovery log All updates are stored in the recovery log Database dumps associated to checkpoints
33
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 33 Making new checkpoints Disable one backend to have a coherent snapshot Mark the new checkpoint entry in the log Use Octopus to store the dump
34
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 34 Making new checkpoints Replay missing updates from log
35
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 35 Making new checkpoints Re-enable backend when done
36
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 36 Handling a backend failure A node fails! Automatically disabled but should be fixed or changed by administrator
37
Usenix Annual Conference, Freenix track – June 2004 – c-jdbc@objectweb.org 37 Fault tolerant recovery log UPDATE statement
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.