server-farm

PHP $_SERVER[‘SERVER_ADDR’] variable always returns 127.0.0.1

谁说我不能喝 提交于 2020-01-03 19:57:14
问题 We have multiple load-balanced webserver machines running the same PHP webapp (LAMP) and I'd like to run slightly different code on each server ( for testing purposes ). I was hoping to use the $_SERVER['SERVER_ADDR'] super global to do something like this: if ($_SERVER['SERVER_ADDR'] == 'XXX.XXX.XXX.XXX') { echo "Do one thing"; } elseif ($_SERVER['SERVER_ADDR'] == 'YYY.YYY.YYY.YYY') { echo "Do something else"; } Unfortunately, this doesn't work because both machines are setting $_SERVER[

What to use instead of the “lock” statement when the code is running on multiple machines?

百般思念 提交于 2019-12-09 09:16:42
问题 The lock statement ensures that one thread does not enter a critical section of code while another thread is in the critical section. However, it won't work if the workload is spread across a farm of servers (e.g. a few IIS servers + a load balancer). Does .NET support such a scenario? Is there any class that can be used to control the execution of a critical code section by threads running on multiple machines? If not, is there any standard method of handling such problems? This question was

SSRS 2008 R2, Farm - Load Balanced and HTTP status 401: Unauthorized

佐手、 提交于 2019-12-08 00:27:30
问题 I have SQL Server Reporting services 2008 R2 environment in my Company. 2 servers Windows 2008 R2: PRERPSW01 and PRERPSW02 , in domain DOMAIN_Company NLB name: PRERPS IPs address ( I get by ping command): PRERPSW01 192.168.110.41 prerps 192.168.90.92 hosts file in PRERPSW01 server 192.168.110.41 prerps In PRERPSW01 and PRERPSW02 servers, there is this configuration: Config Report Server: C:\Program Files\Microsoft SQL Server\MSRS10_50.REPORTING\Reporting Services\ReportServer\rsreportserver

SSRS 2008 R2, Farm - Load Balanced and HTTP status 401: Unauthorized

谁都会走 提交于 2019-12-06 06:39:53
I have SQL Server Reporting services 2008 R2 environment in my Company. 2 servers Windows 2008 R2: PRERPSW01 and PRERPSW02 , in domain DOMAIN_Company NLB name: PRERPS IPs address ( I get by ping command): PRERPSW01 192.168.110.41 prerps 192.168.90.92 hosts file in PRERPSW01 server 192.168.110.41 prerps In PRERPSW01 and PRERPSW02 servers, there is this configuration: Config Report Server: C:\Program Files\Microsoft SQL Server\MSRS10_50.REPORTING\Reporting Services\ReportServer\rsreportserver.config HostName: PRERPS. UrlRoot: http://PRERPS/ReportServer In PRERPSW01 , I use credentials PRERPSW01

What to use instead of the “lock” statement when the code is running on multiple machines?

冷暖自知 提交于 2019-12-03 11:20:42
The lock statement ensures that one thread does not enter a critical section of code while another thread is in the critical section. However, it won't work if the workload is spread across a farm of servers (e.g. a few IIS servers + a load balancer). Does .NET support such a scenario? Is there any class that can be used to control the execution of a critical code section by threads running on multiple machines? If not, is there any standard method of handling such problems? This question was inspired by a discussion that started here but is not limited to SharePoint or ASP.NET. Kit If you