question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Handle Degradation of service?

See original GitHub issue

Hey Algolia, neat library.

We’re trying to launch this in production, but we’re stuck at degradation of service. Let’s say we forget to update our billing and you shut us off, or your servers go down and the search doesn’t return.

How do we gracefully handle occurrences such as this? We want to be able to revert to our old flow without Algolia places in the event that your service cannot be reached.

Is there some kind of PING we can ping to your servers to check for service?

Or does the

places({ ... })

init have any error condition / catch?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
raphicommented, May 29, 2019

@lightninglu10 you could use a proxy to intercept the requests you want or you can just edit your /etc/hosts file and redirect the domain to your localhost. The first request will fail (your localhost returning nothing) and it will retry on another domain.

For example: /etc/hosts

127.0.0.1       places-dsn.algolia.net

You will then see requests hitting another domain (we have redundancy on all our DNS domains in case the DNS fails… rare but it happened!).

Then, we have redundancy on servers as well. All our clusters at Algolia are redundant with 3 servers behind, placed in different datacenters. If one fails or answers too slowly, the client will switch to another one. On top of that, for Places, we have setup DSN servers all around the world, to be closer to the end user.

Let me know if that helps!

0reactions
Haroenvcommented, May 29, 2019

You can enable “offline” mode in your devtools

Read more comments on GitHub >

github_iconTop Results From Across the Web

Four Considerations When Designing Systems For Graceful ...
Part of that planning should include designing for graceful degradation of services, which allows for more limited functionality while avoiding ...
Read more >
Cascading Failures - Google - Site Reliability Engineering
Graceful degradation shouldn't trigger very often—usually in cases of a capacity planning failure or unexpected load shift. Keep the system simple and ...
Read more >
How does information technology-based service degradation ...
Hence, an ITSD refers to a service failure in which the IT-based service is not provided as expected to the customer and this...
Read more >
Service Portal: Ways to handle performance degradation in ...
In Service Portal, Performance Degradation can occur when a knowledge category contains a large number of articles in kb_category page. This occurs because...
Read more >
What is graceful degradation? | Definition from TechTarget
In graceful degradation, the operating efficiency or speed declines gradually as an increasing number of components fail.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found