We do it in a  global cache, each hyper-visor with  an instance, when want to call api from an connection first get the connection from the cache, when get failed try reconnect. Then is will only be block when the first time the connection build, or the connection is broken.<br>
<br><div class="gmail_quote">On Wed, Sep 5, 2012 at 11:41 PM, lulin Fan <span dir="ltr"><<a href="mailto:fan.luliin@gmail.com" target="_blank">fan.luliin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><div class="gmail_quote">Hi<div><br></div><div>I am writing a web-based management tool for KVM, it will manager a lot of remote KVM host, when user add a new connection from the UI, it will take a long time to open the libvirt connection sometimes due to the network problem, during this progress, the management tool will block the request of other user, it is not a good idea for users.</div>


<div><br></div><div>BR</div><span><font color="#888888"><div><br></div></font></span><div><span><font color="#888888">Fan</font></span><div><div><br><br><div class="gmail_quote">On 5 September 2012 14:55, Timon Wang <span dir="ltr"><<a href="mailto:timonwst@gmail.com" target="_blank">timonwst@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><br><br>On Wed, Sep 5, 2012 at 11:53 AM, lulin Fan <<a href="mailto:fan.luliin@gmail.com" target="_blank">fan.luliin@gmail.com</a>> wrote:<br>


> Hi all,<br>><br>> does anybody know how to do non-blocking virtConnectOpen? does libvirt<br>
> support it or not cause I can't find any document about it? or should I need<br>> create a thread to do it?<br><br></div></div>It's worth to use non-blocking? What will you do without connect? If it's not related with libvirt connection, you can do in it in another thread if you like.<br>



><br>><br>> Thanks<br>><br>> Fan<br>><br>> _______________________________________________<br>> libvirt-users mailing list<br>> <a href="mailto:libvirt-users@redhat.com" target="_blank">libvirt-users@redhat.com</a><br>



> <a href="https://www.redhat.com/mailman/listinfo/libvirt-users" target="_blank">https://www.redhat.com/mailman/listinfo/libvirt-users</a><span><font color="#888888"><br><br><br><br>-- <br>Focus on: Server Vitualization, Network security,Scanner,NodeJS,JAVA,WWW<br>



Blog: <a href="http://www.nohouse.net" target="_blank">http://www.nohouse.net</a><br>
</font></span></blockquote></div><br></div></div></div>
</div><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Focus on: Server Vitualization, Network security,Scanner,NodeJS,JAVA,WWW<br>Blog: <a href="http://www.nohouse.net">http://www.nohouse.net</a><br>