Azure / azure-storage-php

Microsoft Azure Storage Library for PHP
MIT License
217 stars 199 forks source link

Support FQDN #249

Open Vandersteen opened 4 years ago

Vandersteen commented 4 years ago

Which service(blob, file, queue, table) does this issue concern?

All

Which version of the SDK was used?

Latest

What's the PHP/OS version?

7.3

What problem was encountered?

MicrosoftAzure\Storage\Common\Exceptions\ServiceException: Fail: Code: 400 Value: Bad Request details (if any):

Steps to reproduce the issue?

Add the following to the connection string: ;EndpointSuffix=core.windows.net. (note the trailing DOT)

Have you found a mitigation/solution?

No

Why ?

As we are using kubernetes, a FQDN helps with reducing the amount of dns calls. Right now every time we use (blob) storage, this results in 12 DNS lookups. Using a FQDN could reduce this to 2.

I'm not 100% sure this is a PHP only issue, as going to : https://.blob.core.windows.net./ also results in the same error (again note the trailing DOT).

Removing the trailing dot removes the error.

XiaoningLiu commented 4 years ago

Hi @Vandersteen

The 400 error is from Azure Storage service and could not be resolved by PHP SDK.