Sign In
Nicholas Allen's Indigo Blog
Windows Communication Foundation From the Inside
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Options
Blog Home
About
Email Blog Author
Share this
RSS for posts
Atom
RSS for comments
Search
Advanced search options...
Search In:
Everything
Blogs
Forums
People
Groups
Places
Pages
Date range:
All Time
Last Year
Last 6 Months
Last 3 Months
Last Month
Last Week
Last Two Days
Tags
Answers
Bindings
Channel Extensibility
Channels
Conferences
Contracts
Debugging
Hosting
HTTP
Indigo
Learning
Message Security
Messages
Net4
Networking
Orcas
Proxies
Releases
Security
Service Architecture
Service Model
Silverlight
TCP/IP
Transport Security
Transports
Archive
Archives
June 2010
(1)
May 2010
(9)
April 2010
(22)
March 2010
(23)
February 2010
(20)
January 2010
(20)
December 2009
(21)
November 2009
(21)
October 2009
(22)
September 2009
(22)
August 2009
(22)
July 2009
(22)
June 2009
(22)
May 2009
(20)
April 2009
(22)
March 2009
(22)
February 2009
(20)
January 2009
(21)
December 2008
(21)
November 2008
(18)
October 2008
(23)
September 2008
(21)
August 2008
(21)
July 2008
(22)
June 2008
(22)
May 2008
(21)
April 2008
(22)
March 2008
(21)
February 2008
(21)
January 2008
(22)
December 2007
(19)
November 2007
(20)
October 2007
(23)
September 2007
(19)
August 2007
(23)
July 2007
(21)
June 2007
(21)
May 2007
(22)
April 2007
(22)
March 2007
(22)
February 2007
(20)
January 2007
(23)
December 2006
(20)
November 2006
(23)
October 2006
(24)
September 2006
(24)
August 2006
(23)
July 2006
(21)
June 2006
(26)
May 2006
(23)
April 2006
(20)
March 2006
(26)
February 2006
(20)
Five Pitfalls of the Channel Model, Part 2
MSDN Blogs
>
Nicholas Allen's Indigo Blog
>
Five Pitfalls of the Channel Model, Part 2
Five Pitfalls of the Channel Model, Part 2
Nicholas Allen
4 Apr 2006 8:00 AM
Comments
1
In yesterday's post, we looked at the
first three subtle rules
, aka pitfalls, of the channel model. Today's post covers pitfalls four and five. A pitfall is something that has significant negative consequences and no clear indication in the code that you're doing something wrong. I wish we had fewer pitfalls because then anyone could pick up and use the channel model with confidence. However, a lot of these pitfalls are the result of providing you with power and flexibility in other areas. We try very hard to hide the pitfalls from you when you're using contracts and the Service Framework. Using the channel model directly is a tradeoff, like using assembly language. There are times when it's the right solution to the problem, but you're giving up safety in exchange for more freedom. At least with managed code though, you don't have to give up that much safety to get things done.
Pitfall #4:
Actual maximum may be smaller than it appears
We let you specify a lot of different types of limits to restrict resource consumption, but we can never guarantee that you can actually hit those limits. Setting the limits low protects you from Denial of Service (DOS) attacks at the cost of sometimes turning away legitimate traffic. We've been very conservative with the default settings to keep you safe out of the box. There are real world scenarios where you have to relax the limits to get your work done.
Some people are a little too relaxed with the limits. You have to be realistic about the computational resources you can afford to spend. Even if you set a very long timeout for an operation, we may give up before that if things are failing. Even if you permit thousands of connections, you may not have enough memory, CPU, or bandwidth to talk with all of those clients before they die off. Once your server hits full load, there are situations where it can begin to degrade very rapidly as you try to add more load. And, as I pointed out in an earlier post, even if you permit ridiculously large message sizes, there are a lot of
factors preventing you from successfully sending messages that big
. The moral of this story is that while the default settings leave a lot of headroom in production environments, there are limits to how far you can push your limits.
Pitfall #5:
Complain if you don't want to do something
The last pitfall that I want to point out in this edition is that you always have to remember that we're all in this together. Your service limits what clients can do by providing a restricted set of verbs to act on. A service can validate client requests before taking action. The code running behind your service is inside this trust boundary. The channel model has rules you must follow, such as the object state machine. There are ways to indicate that a problem has occurred and then there's also ways to simply misbehave. At the channel model level, we can't do much to protect a misbehaving service from itself. If you're lucky, your service gets caught breaking the rules without much penalty. Sometimes, the service just dies and gets restarted. Don't rely on this. Make sure you follow the rules of the game, and we'll do our best to make sure that the rules actually work like we claim they do.
Next time:
Using the Base Classes to Build Channels
1 Comments
Channels
,
Indigo
Blog - Comment List MSDN TechNet
Comments
Loading...