23

Is there a difference between stability and reliability (at least in software engineering context) or can they be used interchangeably? If not, what would be some examples of reliable but not necessarily stable systems, and vice versa?

marstato
  • 4,538
  • 2
  • 15
  • 30
gsakkis
  • 403
  • 1
  • 3
  • 5

7 Answers7

38

Let's say for instance we have an app, it works perfectly, aside from it crashing every 5 minutes, but it's back up instantly without data loss.

That in my mind is reliable, but not stable.

I can rely on it not losing data and working correctly, despite it not being stable.

In fact, the internet is basically that. It's far from stable—connections drop and reappear, packets collide and are lost, and all kinds of other unstable things happen. However, it's pretty amazing how reliable it is given all the instability inherent in it.

Justin
  • 176
  • 9
CaffGeek
  • 8,033
  • 5
  • 32
  • 38
  • 3
    Ian Somerville defines reliability as "The probability of failure-free operation over a specified time, in a given environment, for a specific purpose." in the book Software Engineering. So your system crashing every 5 minutes is not so reliable (depends on your metrics though). – Random42 Jul 24 '12 at 19:31
  • 2
    @m3th0dman, depends how you define a failure then. No data loss, and 100% data accuracy would not be a failure in my books, even if the app kept crashing and restarting itself. I'd want to fix the issue, but it wouldn't be a high priority if it kept 'working' – CaffGeek Jul 24 '12 at 19:37
  • If your system crashes, then there obviously was a failure somewhere and thus your operation was not failure-free (as suggested by the definition); thus your system is not so reliable. The discussion can be detailed into talking about availability, response and restart time. – Random42 Jul 24 '12 at 19:45
  • I seriously don't think this example app is reliable. Reliability and stability are not necessarily two separate things. – Zippo Jul 24 '12 at 20:24
  • @m3th0dman: Erlang programs are considered reliable, not because they are infallible, but because they consist of many concurrent processes (not OS processes) which can fail without compromising the program as a whole, which is designed to handle those failures. – André Paramés Jul 25 '12 at 09:53
  • @André Paramés Those type of systems are fault-tolerant ones; Chad mentioned that the (whole) applications crashes every 5 minutes, not just parts of it. – Random42 Jul 25 '12 at 11:32
  • @m3th0dman: Chad also said the application restarted itself instantly, so obviously it's fault-tolerant (*something* in the application has to be restarting itself). – André Paramés Jul 25 '12 at 11:57
  • @m3th0dman, I was trying to keep the exact technical design out of my generalized answer. Whether it's one app, all apps, whatever, as long as you can rely on the results, it's reliable. Doesn't matter if it crashes and restarts itself, or another process picks it up along the way. – CaffGeek Jul 25 '12 at 14:07
  • @Chad As I have said above, it depends on your metrics; if you make a request and the system does not answer (in say 5 s) because it just crashed then the caller might consider a system failure; your system is unresponsive. The fact that the system performs as expected is due to the most fundamental requirement of any system, that is functionality; in this case the system is functional, not necessarily stable. Anyway the difference between stability and reliability is clearly defined in the answer given by KeesDijk, definition given by ISO. – Random42 Jul 25 '12 at 14:44
  • 'Crashing every 5 minutes' is reliable?! Not at all, not at all. What about if you're a real-time data provider of some sort? Or web host? DB service? – JᴀʏMᴇᴇ Jul 18 '16 at 12:10
  • @JayMee, As I stated, as long as it's back up, no data was lost, and nobody notices, it's "reliable", it's definitely not stable, but I can rely on it. We rely on things that fail ALL the time. It's literally how the internet works. Packets don't reach their destinations frequently, but because of the ability to detect this, and resend, we can rely on it...despite it not being stable – CaffGeek Jul 18 '16 at 14:49
26

These definitions come from the ISO 9126 Standard, which divides in characteristics and sub characteristics : this table , this pdf or wikipedia or article

Stability is : Characterizes the sensitivity to change of a given system that is the negative impact that may be caused by system changes.

Reliability is a main characteristic that contains:

  • maturity : This sub characteristic concerns frequency of failure of the software.
  • fault tolerance : The ability of software to withstand (and recover) from component, or environmental, failure.
  • recoverability : Ability to bring back a failed system to full operation, including data and network connections.
KeesDijk
  • 8,918
  • 4
  • 35
  • 41
8

Goal: write a program to add two numbers

Reliable but unstable:

add(a,b):
    if randomInt mod 5 == 0: 
        throw exception
    else
        print a+b

Stable but unreliable:

add(a,b):
    if randomInt mod 5 == 0: 
        print a+a
    else
        print a+b
Gort the Robot
  • 14,733
  • 4
  • 51
  • 60
2

In the context of evaluating libraries, the terms mean completely different things.

A reliable library is one that does its job without intermittent failures.

A stable library is one that doesn't change much.

Sebastian Redl
  • 14,950
  • 7
  • 54
  • 51
  • I am surprised to see so many answers that interpret stable as "does not crash". To me the first meaning is indeed "has not changed much for some time", it is no longer moving. The thing not crashing anymore may be something that comes along with it but stability is not primarily about software behavior. – Martin Maat May 17 '19 at 21:08
0

Stability and Reliability are different things in software development, however they both used as the sister-terms :)

I agree with some mentioned previous comments and would like to add my 2 cents.

Reliability is the extent to which an experiment, test, or any measuring procedure yields the same result on repeated trials.

Stability reliability (sometimes called test, re-test reliability) is the agreement of measuring instruments over time. To determine stability, a measure or test is repeated on the same subjects at a future date. Results are compared and correlated with the initial test to give a measure of stability.

More references on this topic are provided :

Yusubov
  • 21,328
  • 6
  • 45
  • 71
0

To my mind, "reliability" means you have a grasp on the bound of the system. You can, with confidence, say that "we provide response time X at the Xth percentile" (the higher the X, the better, obviously).

Stability, on the other hand, is merely an availability measure. "If you try to connect tio our service, it will be there at least X% of the times".

Vatine
  • 4,251
  • 21
  • 20
0

Reliable but not Stable:

add(a,b):
    if a == nil ||  b == nil: 
        throw exception
    else
        return (a+b)

Stable but not Reliable:

add(a,b):
    if a == nil ||  b == nil: 
        return 0
    else
        return (a+b)