Solution 1:

Expanding on my comment, let me say some things about $X=\operatorname{Spec}(\mathbb{Z}^\mathbb{N})$. There is a natural continuous map $X\to\beta\mathbb{N}$, sending a prime ideal to the ultrafilter determined by the idempotents it contains. Let us fix an ultrafilter $U\in\beta\mathbb{N}$ and study the fiber of $X$ over $U$. This fiber can be identified with $\operatorname{Spec} \prod_U\mathbb{Z}$, where $\prod_U \mathbb{Z}$ is the ultrapower of $\mathbb{Z}$ by the ultrafilter $U$. When $U$ is principal, the ultrapower is just $\mathbb{Z}$, so we just have a copy of $\operatorname{Spec}(\mathbb{Z})$.

From now on, let us assume $U$ is nonprincipal, and write $^*\mathbb{Z}=\prod_U\mathbb{Z}$ (as in nonstandard analysis). We can say quite a lot about the ring $^*\mathbb{Z}$ using the fact that it is elementarily equivalent to $\mathbb{Z}$. First, it is a Bezout domain. There is a canonical total ordering on $^*\mathbb{Z}$; we denote the nonnegative elements by $^*\mathbb{N}$. Since the only units in $^*\mathbb{Z}$ are $\pm 1$, every principal ideal of $^*\mathbb{Z}$ is generated by a unique element of $^*\mathbb{N}$.

There are uncountably many prime elements $p\in{}^*\mathbb{N}$, and each of them generates a maximal ideal of $^*\mathbb{Z}$ (if $p$ is represented by $(p_n)\in\mathbb{Z}^\mathbb{N}$, then $U$-almost all of the $p_n$ are prime integers, and the residue field $^*\mathbb{Z}/p$ can naturally be identified with the ultraproduct $\prod_U\mathbb{Z}/p_n$). Furthermore, we have a kind of "hyperfinite prime factorization": every nonzero $n\in{}^*\mathbb{N}$ can be written uniquely as a "product" $\prod_{i=1}^N p_i^{M_i}$. Here $N\in{}^*\mathbb{N}$, each $M_i\in {}^*\mathbb{N}$, and the $p_i$ are a collection of primes of $^*\mathbb{N}$ in increasing order (this "product" is to be interpreted as an operation done on each coordinate of $\mathbb{Z}^\mathbb{N}$; on each coordinate, it is only a finite product).

Now let $\mathbb{P}$ denote the set of primes of $^{*}\mathbb{N}$. Let $\mathcal{B}$ denote the Boolean rng (i.e., Boolean algebra without unit) of bounded internal subsets of $\mathbb{P}$ ("internal" in the sense of nonstandard analysis). For nonzero $n\in {}^*\mathbb{Z}$, let $V(n)\in\mathcal{B}$ denote the set of primes dividing $n$. If $I\subset{}^*\mathbb{Z}$ is an ideal, the set $V(I)=\{V(n):n\in I\setminus\{0\}\}$ is a filter on $\mathcal{B}$. If $I$ is prime, it is not hard to see that $V(I)$ is an ultrafilter (here an ultrafilter means that if $A\cup B$ is in the filter then either $A$ or $B$ is in the filter; these are in bijection with ultrafilters on the unitization of $\mathcal{B}$).

Conversely, if $F$ is any filter on $\mathcal{B}$, $I(F)=\{n:V(n)\in F\}\cup\{0\}$ is an ideal such that $V(I(F))=F$. If $F$ is a nonempty ultrafilter, it is easy to see that in fact $I(F)$ is a maximal ideal, and that the operations $V$ and $I$ are inverse for maximal ideals and nonempty ultrafilters. We thus conclude that there is a bijection between maximal ideals in $^*\mathbb{Z}$ and nonempty ultrafilters on $\mathcal{B}$. Furthermore, $I(\emptyset)=0$ is also a prime ideal.

We can also describe the topology on $\operatorname{MaxSpec}(^*\mathbb{Z})$: the closed sets are generated by the sets $C_A=\{I:A\in V(I)\}$ for $A\in\mathcal{B}$. That is, identifying ultrafilters with Boolean homomorphisms $\mathcal{B}\to\{0,1\}$, $\operatorname{MaxSpec}(^*\mathbb{Z})$ is topologized as a subset of $\{0,1\}^\mathcal{B}$, where $\{0,1\}$ is topologized such that only $1$ is closed. (Note that when $U$ is principal, $\mathbb{P}$ is just the ordinary prime numbers, $\mathcal{B}$ is the finite subsets of $\mathbb{P}$, every nonempty ultrafilter is principal, and this exactly describes the familiar cofinite topology on $\operatorname{MaxSpec}(\mathbb{Z})$.)

Let us now look at more general prime ideals. If $I\subset{}^*\mathbb{Z}$ is a prime ideal, then $V(I)$ is an ultrafilter. If $V(I)$ is empty, then $I=0$; otherwise, $I(V(I))$ is the unique maximal ideal containing $I$.

Given any nonempty ultrafilter $F\subset\mathcal{B}$, there are many non-maximal primes contained in $I(F)$. For instance, if $H\subset {}^*\mathbb{N}$ is an initial segment closed under addition, then the set of $n\in{}^*\mathbb{Z}$ such $\{p\in\mathbb{P}:p^h\mid n\text{ for all }h\in H\}\in F$ is a prime ideal $I(F,H)$ contained in $I(F)$. These prime ideals are distinct for distinct $H$, and are totally ordered in the reverse order of $H$. There are uncountably many such $H$, so this gives a canonical uncountable chain of primes inside each maximal ideal of ${}^*\mathbb{Z}$. If $F$ is a principal ultrafilter (so the maximal ideal $I(F)$ is just generated by some $p\in\mathbb{P}$), it is easy to see that every prime contained in $I(F)$ is of this form, so in particular the primes below $I(F)$ are totally ordered. When $F$ is not principal, I'm not sure if there are other primes below $I(F)$ besides these. (For instance, you could try letting the $H$ could vary for different points of $\mathbb{P}$, but maybe that just makes you end up with $I(F,H')$, where $H'$ is some sort of limit of the $H$s with respect to the ultrafilter $F$...but this is complicated to think about, because $F$ isn't actually an ultrafilter on $\mathbb{P}$, only on the internal subsets of $\mathbb{P}$...and then there's the further complication that for $A\in F$, not every function $A\to{}^*\mathbb{N}$ can correspond to the prime factorization of a number, only such functions that are internal can...)

Solution 2:

Here is a comment about the first bit of Eric Wofsey's answer, namely the natural map $X \to \beta \mathbb{N}$. $\beta \mathbb{N}$ is, in a precise sense, the "space of connected components" of $X$, as follows. There is a functor $\text{CRing} \to \text{Set}$ sending a commutative ring $R$ to the set of idempotents in $R$. This functor naturally lifts to Boolean rings: the set of idempotents acquires a Boolean ring structure via the usual multiplication with modified addition

$$a +' b = a + b - 2ab.$$

(This reduces to the usual addition if $R$ has characteristic $2$ but not in general.) I will call this ring $B(R)$. The spectrum of $B(R)$ in the sense of Stone duality is a Stone space called the Pierce spectrum of $R$, and so taking Pierce spectra gives a functor from affine schemes to Stone spaces.

Given any prime ideal $P$ of $R$, the homomorphism $R \to R/P$ induces a homomorphism $B(R) \to B(R/P)$, but since $R/P$ is an integral domain, $B(R/P) \cong \mathbb{F}_2$, and hence we get a homomorphism $B(R) \to \mathbb{F}_2$, or equivalently a point in the Pierce spectrum. This gives a natural continuous map

$$\text{Spec } R \to \text{Spec } B(R).$$

Now, why is it natural to think of $\text{Spec } B(R)$ as the space of connected components? The functor $B(R)$ is representable by the free commutative ring on an idempotent, namely

$$\mathbb{Z}[x]/(x^2 - x) \cong \mathbb{Z} \times \mathbb{Z}.$$

The corresponding affine scheme is "two points" $\text{Spec } \mathbb{Z} \coprod \text{Spec } \mathbb{Z}$. This is naturally a Boolean ring object in the category of affine schemes (true more generally for the coproduct $1 \coprod 1$ of two copies of the terminal object in any distributive category), and so maps into it naturally form a Boolean ring, which is just $B(R)$. The analogous construction for topological spaces produces for each space $X$ a natural Stone space $S(X)$ and a natural continuous map $X \to S(X)$ whose fibers (I think) are connected. Maybe it is the left adjoint to the inclusion of Stone spaces into spaces?

From here it's not hard to see that the Pierce spectrum of any infinite product $\prod_{i \in \mathbb{N}} D_i$ of connected rings is $\beta \mathbb{N}$.