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 Video Library
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
View Events Video Library
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
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

Integrating PostgreSQL Databases with ANF: Join this workshop to learn how to create a PostgreSQL server using Instaclustr’s managed service

Mobile Database Essentials: Assess data needs, storage requirements, and more when leveraging databases for cloud and edge applications.

Monitoring and Observability for LLMs: Datadog and Google Cloud discuss how to achieve optimal AI model performance.

Automated Testing: The latest on architecture, TDD, and the benefits of AI and low-code tools.

Related

  • API Design
  • Introduction To Template-Based Email Design With Spring Boot
  • RAML vs. OAS: Which Is the Best API Specification for Your Project?
  • Maximizing API Success: The Importance of Wireframing and Modeling

Trending

  • How To Validate Archives and Identify Invalid Documents in Java
  • LLMs for Bad Content Detection: Pros and Cons
  • An Introduction to Build Servers and Continuous Integration
  • Information Security: AI Security Within the IoT Industry
  1. DZone
  2. Data Engineering
  3. Databases
  4. API Design Choices - Sharding Status for Failure Scenarios

API Design Choices - Sharding Status for Failure Scenarios

Oren Eini user avatar by
Oren Eini
·
Jun. 01, 12 · Interview
Like (0)
Save
Tweet
Share
4.27K Views

Join the DZone community and get the full member experience.

Join For Free

this post conclude this week’ series of api design choices regarding how to handle partial failure scenarios in sharded cluster. in my previous post ,  i discussed my issues with a local solution for the problem.

the way we ended up solving this issue is actually quite simple. we apply a global solution to a global problem, we added the ability to inject error handling logic deep into the execution pipeline of the sharding implementation, like this:

image

in this case, as you can see, we are allow requests to fail if we are querying (because we can probably still get something from other servers that will be useful), but if you are requesting something by id and it generates an error, we will propagate this error. note that in our implementation, we call to a user defined “notifyuserinterfaceaboutserverfailure”, which will let the user know about the error.

that way, you probably have some warning in the ui about partial information, but you are still functional. this is the proper way to handle this, because you are handling this once , and it means that you can handle it properly , instead of having to do the right thing everywhere.

API Design

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

Opinions expressed by DZone contributors are their own.

Related

  • API Design
  • Introduction To Template-Based Email Design With Spring Boot
  • RAML vs. OAS: Which Is the Best API Specification for Your Project?
  • Maximizing API Success: The Importance of Wireframing and Modeling

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

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: