FAQ
Into a web application with different services (user register, login, etc),
how would you manage any possible error got in those services, i.e. from a
SQL query?

I'm thinking that should be shutdown all those services from the first
error, finally it is sent a HTTP message to be showed by the web server. Am
I right or is it too strict?

--

Search Discussions

  • Kyle Lemons at Dec 2, 2012 at 9:19 pm

    On Sun, Dec 2, 2012 at 2:51 PM, Archos wrote:

    Into a web application with different services (user register, login,
    etc), how would you manage any possible error got in those services, i.e.
    from a SQL query?
    Handle errors in your web application the way you would handle errors in
    any other application. If you have an error at a level at which you know
    how to handle it, do so. If you have some context that can make it easier
    for some level above you to handle it, add it. Otherwise pass it up the
    chain.

    I'm thinking that should be shutdown all those services from the first
    error, finally it is sent a HTTP message to be showed by the web server. Am
    I right or is it too strict?
    If you've got a distributed system, I suggest that you do *not* want one
    component to fail when another component fails, you should gracefully
    degrade as much as possible, fail over to other backends, turn on any
    pushback mechanisms you have, and log or export the episode so that your
    monitoring can notice if the incident is widespread and needs a human to
    intervene in order to repair it.

    --
  • Patrick Mylund Nielsen at Dec 2, 2012 at 10:01 pm
    In some environments it can be useful to shut down everything on a single
    box or network if one thing fails, i.e. if you're getting network timeouts,
    to let another box or network handle the request, rather than try to
    resolve the error/do so very slowly in that instance of the application.
    You should figure out what's right for your scenario.

    On Sun, Dec 2, 2012 at 10:19 PM, Kyle Lemons wrote:
    On Sun, Dec 2, 2012 at 2:51 PM, Archos wrote:

    Into a web application with different services (user register, login,
    etc), how would you manage any possible error got in those services, i.e.
    from a SQL query?
    Handle errors in your web application the way you would handle errors in
    any other application. If you have an error at a level at which you know
    how to handle it, do so. If you have some context that can make it easier
    for some level above you to handle it, add it. Otherwise pass it up the
    chain.

    I'm thinking that should be shutdown all those services from the first
    error, finally it is sent a HTTP message to be showed by the web server. Am
    I right or is it too strict?
    If you've got a distributed system, I suggest that you do *not* want one
    component to fail when another component fails, you should gracefully
    degrade as much as possible, fail over to other backends, turn on any
    pushback mechanisms you have, and log or export the episode so that your
    monitoring can notice if the incident is widespread and needs a human to
    intervene in order to repair it.

    --

    --

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedDec 2, '12 at 7:51p
activeDec 2, '12 at 10:01p
posts3
users3
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase