DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
Building Scalable Real-Time Apps with AstraDB and Vaadin
Register Now

Trending

  • Send Email Using Spring Boot (SMTP Integration)
  • Tactics and Strategies on Software Development: How To Reach Successful Software [Video]
  • Building a Robust Data Engineering Pipeline in the Streaming Media Industry: An Insider’s Perspective
  • Microservices With Apache Camel and Quarkus (Part 2)

Trending

  • Send Email Using Spring Boot (SMTP Integration)
  • Tactics and Strategies on Software Development: How To Reach Successful Software [Video]
  • Building a Robust Data Engineering Pipeline in the Streaming Media Industry: An Insider’s Perspective
  • Microservices With Apache Camel and Quarkus (Part 2)
  1. DZone
  2. Data Engineering
  3. Databases
  4. What Changed in RavenDB 3.0: Replication

What Changed in RavenDB 3.0: Replication

Oren Eini user avatar by
Oren Eini
·
Sep. 30, 14 · Interview
Like (0)
Save
Tweet
Share
2.27K Views

Join the DZone community and get the full member experience.

Join For Free

replication is kinda important to ravendb. it is the building block for high availability and transparent failover, it is how we do scale out in many cases. i think that you won’t be surprised to hear that we have done a lot of work around that area as well.

some of that was internal, just optimizing how we are doing things. one such case was optimizing the addition of a new node to a cluster. previously, that would mean that are carefully laid out plans for how to allocate memory for replication would have to be disrupted, and a lot of the time, we would need to do extra work to server both existing and new replication destinations. in ravendb 3.0, we have specifically addressed this, and now we can do much better for this scenario, or even the more common one when you have one slower node.

but for the most part, a lot of the changes that has been made were done to make it easier to work with replication. the following screen shot shows a lot of the new features all at once:

image

now, instead of defining the failover replication behavior on a client side (which meant that different clients could have different failover behavior), we define this behavior on the server side (note that server side behavior will override the client side behavior). this means that your admin can change the cluster from master/slave to the multi master topology and you won’t have to change your code, it will be picked by the clients automatically.

conflict resolution has also became easier. ravendb now ships with three automatic conflict resolvers (prefer local, prefer remote, prefer latest). another one is planned for post 3.0, which will allow you to write a server side conflict resolution script to handle custom logic.  of course, the usual conflict resolutions (client side listener, server side trigger) are still there and humming along quite nicely.

below the replication destinations, you can see the server hilo prefix. this is a feature we had in ravendb for several years, but it has never been really utilized. this allows multiple servers to accept new documents concurrently without having to fear conflicting ids.

another feature that we added was better tracking of the health of the entire cluster. one part of that is the ability to visualize the topology:

image

from the client side of things, the behavior of the client in the presence of failure has been greatly improved. we do automatic failover, of course, but now we do the health checks of the down servers as a background task. that means that after the initial “server is down” shock, we immediately switch over to the secondary nodes, and we’ll handle the primary recovering and switch back to it within a few seconds. that means that we won’t have the complex backoff strategy or the hit that this took when every n request.

another change we made to the client side was the ability to explicitly define the failover configuration on the client. that was a feature that people requested, mostly to handle the “we start the first time and the server is down” scenario. not an hugely common situation, but it completes the entire feature set quite nicely.

Replication (computing)

Published at DZone with permission of Oren Eini, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Trending

  • Send Email Using Spring Boot (SMTP Integration)
  • Tactics and Strategies on Software Development: How To Reach Successful Software [Video]
  • Building a Robust Data Engineering Pipeline in the Streaming Media Industry: An Insider’s Perspective
  • Microservices With Apache Camel and Quarkus (Part 2)

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com

Let's be friends: