We consider a join–the–shortest–queue model, which is as follows. There are K single FIFO servers and M arrival processes. The customers from a given arrival process can be served only by the servers from a certain subset of all servers. The actual destination is the server with the smallest weighted queue length. The arrival processes are assumed to obey a large deviation principle while service is exponential. A large deviation principle is established for the queue–length process. The action functional is expressed in terms of solutions to mathematical programming problems. The large deviation limit point is identified as a weak solution to a system of idempotent equations. Uniqueness of the weak solution follows by trajectorial uniqueness.