  The Join-the-Shortest-Queue routing policy is studied in an asymptotic regime
where the number of processors $n$ scales with the arrival rate. A large
deviation principle (LDP) for the occupancy process is established, as $n\to
\infty$, in a suitable infinite-dimensional path space. Model features that
present technical challenges include, Markovian dynamics with discontinuous
statistics, a diminishing rate property of the transition probability rates,
and an infinite-dimensional state space. The difficulty is in the proof of the
Laplace lower bound which requires establishing the uniqueness of solutions of
certain infinite-dimensional systems of controlled ordinary differential
equations. The LDP gives information on the rate of decay of probabilities of
various types of rare events associated with the system. We illustrate this by
establishing explicit exponential decay rates for probabilities of long queues.
In particular, denoting by $E_j^n(T)$ the event that there is at least one
queue with $j$ or more jobs at some time instant over $[0,T]$, we show that, in
the critical case, for large $n$ and $T$, $\mathbb{P}(E^n_j(T)) \approx
\exp\left [-\frac{n (j-2)^2}{4T}\right].$
