[ovs-discuss] OVSDB connection keep-alive vs. echo RPC

Matt Layher mlayher at digitalocean.com
Thu Dec 7 18:59:45 UTC 2017


I've already got something like that set up anyway so that I can listen 
for notifications for things like "locked", "steal", "update", etc.  I 
think I've got it nailed down pretty well at the moment.

But that leads me to another question: does ovsdb-server send echo RPCs 
to its clients at all?  If so, I can implement something to reply in my 
receive loop.  If not, I won't bother.

- Matt


On 12/07/2017 01:38 PM, Roman Bolshakov wrote:
> Couple years ago I implemented my own lib for OVSDB. It had one 
> communication thread that replied on the echoes as well as sent 
> management commands from the application. Something very similar of 
> what you're thinking to implement but based on python coroutines.
>
> Built-in Python lib is different and talks to wire in the application 
> thread. It replies to probes over TCP but doesn't send them over Unix 
> socket. OVSDB drops a client that doesn't reply a probe. So in case of 
> TCP, it reconnects after a user send a request to process a Transaction.
>
> As far as I understand echo request/replies work better for a 
> local/remote OVS controller that needs full awareness of database 
> state and all changes within it. Indeed, OVN Southbound (as OVS 
> controller) uses it like that.
>
> IMO, for management operations outside of an OVS controller, It's 
> simpler to avoid separate thread with probe replies as additional IPC 
> is needed between threads.
>
> чт, 7 дек. 2017 г. в 20:25, Matt Layher via discuss 
> <ovs-discuss at openvswitch.org <mailto:ovs-discuss at openvswitch.org>>:
>
>     Hi all,
>
>     I'm working on implementing an OVSDB client in Go
>     (https://godoc.org/github.com/digitalocean/go-openvswitch/ovsdb) and
>     recently implemented the Echo RPC.
>
>     https://tools.ietf.org/html/rfc7047#section-4.1.11
>
>     According to the RFC, the purpose of Echo is "to verify the
>     liveness of
>     a database connection".  Does this mean that Echo should be used as a
>     keep-alive of sorts for long-running connections?  I'm thinking about
>     adding a background loop to my client that sends Echo RPCs at a
>     regular
>     interval for this purpose.
>
>     Next, if I were to connect to ovsdb-server via TCP instead of UNIX
>     socket, would enabling TCP keep-alives serve the same purpose?
>
>     If neither of these approaches are necessary, it'd avoid adding some
>     additional complexity to the code.  I'd be very curious to hear what
>     folks have done.
>
>     Thanks for your time,
>
>     Matt Layher
>
>     _______________________________________________
>     discuss mailing list
>     discuss at openvswitch.org <mailto:discuss at openvswitch.org>
>     https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20171207/081486d5/attachment.html>


More information about the discuss mailing list