-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-data center support #27
Comments
By extending the database with a dropin, a global table can be added to refine what needs to actively sync `/**
// setup the list of known global database tables require_once WP_CONTENT_DIR . '/db-config.php'; if ( !defined( 'DATACENTER' ) ) { if ( file_exists( WP_CONTENT_DIR . '/db-list.php' ) ) { Then add in an abstraction layer to extend wpdb
Once the class is extended and options defined, a method to connect to the database server/docker and select the correct database ` public function __construct( $dbuser, $dbpassword, $dbname, $dbhost ) {
Then returning the information ` /**
If this is the direction you want to go, let me know and I'll send you the rest of the multi-db code |
Data center awareness
WordPress + HyperDB supports running in multiple data centers. The HyperDB config includes comments on how to configure it for data center awareness:
Though MySQL is not the only service that needs data center awareness:
mcrouter
support for replicated pools claims to solve that, but I've never used it personally)Given the current implementation, it might be necessary to ignore performance issues with Memached and NFS transactions over the WAN. However, a better implementation would:
mcrouter
and replicated pools or ditching Memcached for Couchbase, which provides a Memcached-compatible interface with cross-data center replicationRequirements for full active-active data center support
Story: The application will be deployed in data centers in two different regions connected by a WAN. Browsers may reach either data center with approximately equal frequency. Operators will specify one data center for the primary database instance, and the application will route requests internally to the correct primary instance in the correct DC.
Questions to answer:
Requirements for a standby data center
Story: We need a minimal foot print of the application running in a remote data center so that we can quickly recover if the the primary data center fails. The replica data center is not handling any end-user requests under normal use, and there is no provision for automatic fail-over. This approach seeks to reduce challenges by eliminating activity in the replica data center that would cause frustration due to slow performance of requests over the WAN or inconsistency due to writes in separate DCs (Memcached and NFS).
incomplete issue
The text was updated successfully, but these errors were encountered: