2012-01-22 4 views
0

5 개의 WCF 서비스가있는 Visual Studio 솔루션이 있습니다. 그들은 모두 같은 프로젝트 "MyCompany.MySoftware.Services"에 있습니다.IIS 7.5를 사용하는 동일한 응용 프로그램에서 여러 서비스 호스팅

이번에는 IIS에서 모든 것을 호스팅하고 있습니다. (Windows 서비스를 사용하여 호스트하는 데 익숙해졌지만 AppFabric을 사용하여 변경하기로했습니다.) HTTP 및 Net.TCP 바인딩을 사용하도록 설정했습니다. 모든 서비스의

구성은 다음과 같다 : 나는 IIS에서 호스팅 할 때 주소없이 내 netTcp 엔드 포인트를하게해야이 게시물에서 읽어

<service name="Kipany.Belvedere.Services.Services.AppointmentService" 
     behaviorConfiguration="GeneralBehavior"> 
    <endpoint address="" binding="wsHttpBinding" 
      contract="Company.Software.Services.IService1" 
      name="appointmenthttp"/> 
    <endpoint address="" binding="netTcpBinding" 
      bindingConfiguration="netTcpBindingConfig" 
      name="appointmenttcp" 
      contract="Company.Software.Services.IService1"/> 
    <endpoint address="mex" binding="mexHttpBinding" 
      contract="IMetadataExchange"/> 
</service> 

<service name="Kipany.Belvedere.Services.Services.AppointmentService" 
     behaviorConfiguration="GeneralBehavior"> 
    <endpoint address="" binding="wsHttpBinding" 
      contract="Company.Software.Services.IService5" 
      name="appointmenthttp"/> 
    <endpoint address="" binding="netTcpBinding" 
      bindingConfiguration="netTcpBindingConfig" 
      name="appointmenttcp" 
      contract="Company.Software.Services.IService5"/> 
    <endpoint address="mex" binding="mexHttpBinding" 
      contract="IMetadataExchange"/> 
</service> 

. 지금은 내 IIS가 808 포트로 구성되어 있으므로 모든 서비스가이 포트를 사용하고 있음을 이해합니다.

질문 :

 
1 - Is this a good architecture to use ? 
2 - Can I face problems with this configuration ? 
3 - What if I want to use every service in a different tcp port ? 
4 - The port for tcp binding is configurated in the Default Website but I have the option to fill the 'address' in the endpoint, what happens in this case ? As I have to put ONE port in the Default Website binding, how can I use more than one port in my Web.Config ? 
5 - My tcp is using the 808 port but this is my Client's Web.Config: 

는 어디 808 포트는?

답변

0
  1. 이 아키텍처는
  2. 이 당신의 문제를
  3. TCP는 IIS (사이트 바인딩)에서 사이트 수준에서 구성됩니다 사용하는 포트의 원인이됩니다 구성에 내재 아무것도 없다 그래서 서비스는 것 괜찮습니다 다른 포트를 사용하려면 다른 사이트에 있어야합니다. 포트와 나머지 주소가 요청을 라우팅하기 위해 있어야합니다. 따라서 다른 포트에있는 서비스에 고유 한 이점이 없습니다.
  4. 3에서와 같이 - 하나의 모든 서비스 사이트는 동일한 포트를 사용합니다.
  5. 클라이언트 요구 사항 주소를 정규화하려면 IIS를 사용하고 서비스 주소 (포트 포함)의 정의를 호스팅하는 서버는 IIS 구성 및 .svc 파일에서 유추됩니다.
+0

이렇게 한 포트만 통증없이 모든 요청을 처리 할 수 ​​있습니까? 동시성은 어떻습니까? 동시에 수행 된 두 개의 요청은 병렬로 처리되거나 다른 요청을 기다리게됩니다. – Catinodeh

+0

모두 서비스의 인스 턴싱 및 동시성 설정에 달려 있습니다. (여기에 대해서는이 블로그에서 http://www.dotnetconsult.co.uk/weblog2/PermaLink,guid,1efac821-2b89-47bb-9d27-48f0d6347914.aspx) 확실히 요청을 병렬로 처리 할 수없는 근본적인 이유는 없습니다. –