[
https://issues.apache.org/jira/browse/JCLOUDS-1135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15372663#comment-15372663
]
ASF subversion and git services commented on JCLOUDS-1135:
----------------------------------------------------------
Commit 7dd02a010a8275aea2c3953aac71c5dec22eeeeb in jclouds-labs's branch
refs/heads/master from [~ladicek]
[ https://git-wip-us.apache.org/repos/asf?p=jclouds-labs.git;h=7dd02a0 ]
[JCLOUDS-1135] improve performance of AzureComputeServiceAdapter.getNode
If the deployment name is the same as cloud service name, which it is
for all nodes created by the JClouds Azure provider, the getNode(id)
method will no longer list all existing cloud services.
> Azure: AzureComputeServiceAdapter.getNode/listNodes perform O(N) requests
> -------------------------------------------------------------------------
>
> Key: JCLOUDS-1135
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1135
> Project: jclouds
> Issue Type: Bug
> Components: jclouds-labs
> Affects Versions: 1.9.2
> Reporter: Ladislav Thon
> Labels: azurecompute
>
> (Note that this is about the "classic" {{azurecompute}} provider, _not_ about
> {{azurecompute-arm}}.)
> The {{AzureComputeServiceAdapter.getNode}} and {{listNodes}} methods perform
> O(N) API requests (where N is the number of existing cloud services). This
> results in abysmal performance when a significant number of cloud services
> exist.
> I'm not sure how {{listNodes}} could possibly be fixed, but I don't really
> care much about this method. The only place where it's used is when
> generating a unique name for newly created nodes, but that can be overridden
> from the outside (via {{templateOptions.nodeNames}}).
> On the other hand, I care a lot about the {{getNode}} method. That one should
> IMHO complete really quickly. The Azure provider, when creating a node,
> always creates a cloud service and a deployment, both of them with the same
> name (see
> https://github.com/jclouds/jclouds-labs/blob/2b36a75f9f/azurecompute/src/main/java/org/jclouds/azurecompute/compute/AzureComputeServiceAdapter.java#L96).
> There are other places in the Azure provider that assume that the deployment
> inside the cloud service has the same name as the cloud service. With this
> assumption, the {{getNode}} method could perform O(1) requests instead of
> O(N), resulting in much better performance.
> Relying on the assumption should be completely safe when working with nodes
> created by the JClouds Azure provider itself. Maybe there are people who use
> the JClouds Azure provider within some configuration made outside of JClouds
> -- for such situations, a configuration flag could be provided, but I
> honestly think it's pretty much impossible to do that.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)