Thanks for your quick reply. I just want confirm that jClouds doesn't support proxy switching in case of failure, and that functionality should be handled by my self. Eventually could you give me advice of some solution that could be used in that case. I'm thinking about using zookeeper (eg. Apache Curator) or simple round-robin.
Part of code to connect to Swift and put some content: //##Connect to swift //Declare and initializing variables String provider = "swift";//or swift-keystone String endpoint = "http://localhost/auth/v1.0" ;// or "http://localhost:5000/v2.0" String user = "test:tester"; String password = "testing"; String container = "name_of_container"; context = ContextBuilder.newBuilder(provider).endpoint(endpoint).credentials(user, password) .buildView(BlobStoreContext.class); blobStore = context.getBlobStore(); if (!blobStore.containerExists(container)) { blobStore.createContainerInLocation(null, container); } //##Put content to swift String fileName = "file name"; InputStream data = new ByteArrayInputStream( "testContent".getBytes() ); CountingInputStream countingInputStream = new CountingInputStream(data); DigestInputStream md5DigestInputStream = md5InputStream(countingInputStream); Blob blob = blobStore.blobBuilder(fileName).name(fileName).payload(md5DigestInputStream).build(); blobStore.putBlob(container, blob); Regards, Krystian On 4.09.2014 at 8:12 PM, "Jeremy Daggett" wrote: Hi Krystian! It appears that your question is related to configuration of a Swift deployment, and not an issue with jclouds itself. I am not sure I follow what you are asking here, so let’s get a little more information! Do you have two proxy servers that your client needs to connect through? That would have to be handled in the logic of your client application. jclouds does not have a mechanism for client auto proxy failover where if one fails, it tries another. What API are you using? Can you please share some of your client code? /jd From: "[email protected]" Reply-To: "[email protected]" Date: Thursday, September 4, 2014 at 3:35 AM To: "[email protected]" Subject: Re: Jclouds OpenStack Swift Hi All I have question. Does jClouds support switching between two proxies on the Swift cluster. If one proxy fails the other should be used by jClouds to connect to Swift. I found only solution with dns or load balancer (external) but I don't want add another element to infrastructure (sophisticated load balancing isn't needed). Currently I'm using amazon api to connect to openstack swift. Thanks for any reply. Regards, Krystian
