While configuring AppFabric caching server I did not see any option to denote a server as primary and any other as secondary. Logically with high availability feature you expect this option to be available for configuration. I would like to know how can I setup secondary cache server with Windows AppFabric.
Are you building a DataCacheFactoryConfiguration object? That's the only reason I can think of why you'd want to know the primary server for a cache, but my understanding of AppFabric is that that's working against the product, not with it.
Your application should be aware of all the servers in an AppFabric cluster, but that's for AppFabric's internals - your code never directly calls a server, you only talk to the logical cache.
The primary server could change a number of times over the lifetime of a cache, if you only ever address the primary server this could make your application very brittle so it's better that you let AppFabric manage which is the primary server and then your code need never worrry about it.
I don't think you can explicitly set which server is going to be primary / backup, but if you use an XML file for your configuration (ClusterConfig.xml), then make sure the 'secondaries' attribute is set to '1', like in this snippet:
<configuration>
<dataCache ...>
<caches>
<cache ... secondaries="1">
That will enable high availability - if you have more than one host in your cluster, of course.