TablePlus / TablePlus

TablePlus macOS issue tracker
https://tableplus.com
3.41k stars 56 forks source link

Feature request: cluster support (splitting of read/write connections) #850

Open natesilva opened 5 years ago

natesilva commented 5 years ago

Feature

Allow the user to specify separate endpoints for “read” and “write” queries.

Use case

We have a database cluster on Amazon Aurora. There is one master server that is read/write, and many replica servers that are read-only.

For performance reasons we want to keep all read queries off of the master. SELECT queries go to the read replicas. Only mutating queries (INSERT, UPDATE, DELETE, DDL) go to the master.

Other examples

This feature is common in ORMs: We use Sequelize.js, which allows you to configure a single “write” host and multiple “read” hosts: http://docs.sequelizejs.com/manual/installation/usage.html#read-replication

Previously we used Laravel, which also supports it: https://laravel.com/docs/5.7/database#read-and-write-connections

It would be great if we could get a similar feature in TablePlus.

huyphams commented 5 years ago

Thanks, @natesilva, but it can increase the complexity of the app. How about creating two windows and one of them is the master?

natesilva commented 5 years ago

It would be very useful to us, but I know it might not be a common use case. Feel free to prioritize accordingly.