Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(672)

Issue 9811044: state/api: Client connection health monitoring (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 11 months ago by dimitern
Modified:
10 years, 11 months ago
Reviewers:
mue, mp+165900, fwereade
Visibility:
Public.

Description

state/api: Client connection health monitoring Added srvState.Ping() and a health checking goroutine that periodically calls is on any API client connection. When a connection is broken, a channel, returned by State.Broken() is closed, thus notifying of the event. This will be used in a follow-up to monitor API client connections vitality, allowing us to detect quickly when a connection is dead. https://code.launchpad.net/~dimitern/juju-core/049-apiserver-support-heartbeat-detection/+merge/165900 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : state/api: Support Ping() and SetDeadline() #

Total comments: 9

Patch Set 3 : state/api: Support Ping() and SetDeadline() #

Total comments: 16

Patch Set 4 : state/api: Client connection health monitoring #

Total comments: 2

Patch Set 5 : state/api: Client connection health monitoring #

Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -3 lines) Patch
A [revision details] View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M state/api/apiclient.go View 1 2 3 4 3 chunks +28 lines, -0 lines 0 comments Download
M state/api/apierror.go View 1 2 1 chunk +1 line, -3 lines 0 comments Download
M state/apiserver/state.go View 1 chunk +5 lines, -0 lines 0 comments Download
M state/apiserver/state_test.go View 1 2 3 4 2 chunks +36 lines, -0 lines 0 comments Download

Messages

Total messages: 10
dimitern
Please take a look.
10 years, 11 months ago (2013-05-27 15:32:49 UTC) #1
dimitern
Please take a look.
10 years, 11 months ago (2013-05-27 15:34:53 UTC) #2
fwereade
NOT LGTM as is -- I think the Deadline stuff is (1) dangerous and (2) ...
10 years, 11 months ago (2013-05-27 21:11:25 UTC) #3
dimitern
I'll remove SetDeadline related stuff and add an internal goroutine which pings and notifies on ...
10 years, 11 months ago (2013-05-28 06:32:20 UTC) #4
dimitern
Please take a look.
10 years, 11 months ago (2013-05-28 07:02:45 UTC) #5
fwereade
a few comments still https://codereview.appspot.com/9811044/diff/12001/state/api/apiclient.go File state/api/apiclient.go (right): https://codereview.appspot.com/9811044/diff/12001/state/api/apiclient.go#newcode20 state/api/apiclient.go:20: const PingFrequency = 5 * ...
10 years, 11 months ago (2013-05-28 07:11:21 UTC) #6
dimitern
Please take a look. https://codereview.appspot.com/9811044/diff/12001/state/api/apiclient.go File state/api/apiclient.go (right): https://codereview.appspot.com/9811044/diff/12001/state/api/apiclient.go#newcode20 state/api/apiclient.go:20: const PingFrequency = 5 * ...
10 years, 11 months ago (2013-05-28 07:22:55 UTC) #7
fwereade
LGTM, thanks
10 years, 11 months ago (2013-05-28 07:25:50 UTC) #8
mue
LGTM, only one naming hint. https://codereview.appspot.com/9811044/diff/17001/state/api/apiclient.go File state/api/apiclient.go (right): https://codereview.appspot.com/9811044/diff/17001/state/api/apiclient.go#newcode105 state/api/apiclient.go:105: func (s *State) healthMonitor() ...
10 years, 11 months ago (2013-05-28 07:43:04 UTC) #9
dimitern
10 years, 11 months ago (2013-05-28 07:49:16 UTC) #10
*** Submitted:

state/api: Client connection health monitoring

Added srvState.Ping() and a health checking
goroutine that periodically calls is on any API
client connection. When a connection is broken,
a channel, returned by State.Broken() is closed,
thus notifying of the event.

This will be used in a follow-up to monitor API
client connections vitality, allowing us to detect
quickly when a connection is dead.

R=fwereade, mue
CC=
https://codereview.appspot.com/9811044

https://codereview.appspot.com/9811044/diff/17001/state/api/apiclient.go
File state/api/apiclient.go (right):

https://codereview.appspot.com/9811044/diff/17001/state/api/apiclient.go#newc...
state/api/apiclient.go:105: func (s *State) healthMonitor() {
On 2013/05/28 07:43:04, mue wrote:
> Typically know that as "heartbeat" (well known term in HA environments).

Didn't sound right, but I guess you're right. Changed.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b