Sun Microsystems 5800 User Manual

Page of 136
Programming Considerations and Best
Practices
This chapter provides considerations and practices that can help you create efficient 5800
system applications.
The following topics are discussed:
Retries and Timeouts
Client applications should place API calls within retry loops to handle cases such as storage
node failover. One immediate retry should be sufficient in the great majority of cases. In some
cases of node failover, retries should be pursued for up to 30 seconds.
When the 5800 system server is sufficiently loaded, client timeouts may occur. To avoid this,
maximum client threads should no greater than 25 times the number of nodes. For example, on
a full-cell with 16 storage nodes, the maximum client threads should be less than or equal to 25
times 16, or 400 client threads.
Query Size Limit
There is a hard limit when querying a live 5800 system or hive on the combined size of query
parameters and literal values that can be processed in one query. The limit is slightly over 8000
bytes. The query string itself does not count against this limit, just the parameter and literal
values in the query.
Each additional parameter or literal in the query contributes 2 bytes of overhead plus the
number of bytes to represent the query value. For this calculation, each date or time value
consumes 4 bytes. Each long, double, or timestamp value consumes 8 bytes. A binary or char
5
C H A P T E R
5
127