The primary difference when writing application code that addresses a sharded collection is to make sure you connect to a mongos instance. Otherwise, as shards are normally implemented as replica sets, the same considerations with regard to access to a replica set, addressed in Chapter 13, Deploying a Replica Set, would apply. The first consideration we'll examine is how to perform a basic connection to a sharded cluster.
Germany
Slovakia
Canada
Brazil
Singapore
Hungary
Philippines
Mexico
Thailand
Ukraine
Luxembourg
Estonia
Lithuania
Norway
Chile
United States
Great Britain
India
Spain
South Korea
Ecuador
Colombia
Taiwan
Switzerland
Indonesia
Cyprus
Denmark
Finland
Poland
Malta
Czechia
New Zealand
Austria
Turkey
France
Sweden
Italy
Egypt
Belgium
Portugal
Slovenia
Ireland
Romania
Greece
Argentina
Malaysia
South Africa
Netherlands
Bulgaria
Latvia
Australia
Japan
Russia