Search code examples
databasesymmetricds

Reduce config tables:SymmetricDS


Well i'm trying to migrate data from my in-memory DB1 to my DB2. For this I'm using SymmetricDS configured in such a way that, when SymmetricDS starts, it will perform an inital load from DB1 to DB2. Furthermore whenever some data modification occurs in DB1, the same is pulled to DB2.

Now this is where i have a problem. SymmetricDS requires configuration tables or Sym Tables to be present at both the DB1 side and DB2 side.

Since my DB1 is in-memory, these configuration tables are taking a lot of memory.

So what I would like to know is whether there is a way ,to keep the configuration tables entirely in a seperate on-disk db, from DB1 side, and yet retain the existing functionality?

Hope i was able to make myself clear.

Any and all suggestions would be appreciated.


Solution

  • Option 1: Minimize runtime tables footprint. You can aggressively purge the runtime tables. For example, purge them every 10 minutes and only keep 10 minutes worth of activity:

    purge.retention.minutes=10
    job.purge.incoming.cron=0 */10 * * * *
    job.purge.outgoing.cron=0 */10 * * * *
    

    Avoid recording the incoming_batch table altogether:

    incoming.batches.record.ok.enabled=false
    

    Option 2: Put SymmetricDS in another database. Setup SymmetricDS to point to a database, like H2 file-based database. That's where all the "SYM" tables will go. Then configure "jdbc" parameters to load into your in-memory database. For example, you could load into Apache Ignite:

    jdbc.db.url=jdbc:ignite:thin://localhost
    jdbc.db.driver=org.apache.ignite.IgniteJdbcThinDriver
    jdbc.db.user=
    jdbc.db.password=
    

    Then set the sym_channel.data_loader_type to "jdbc" for the channels you're using to load data (such as "default" and "reload" channels).