  We study the real rank of points with respect to a real variety $X$. This is
a generalization of various tensor ranks, where $X$ is in a specific family of
real varieties like Veronese or Segre varieties. The maximal real rank can be
bounded in terms of the codimension of $X$ only. We show constructively that
there exist varieties $X$ for which this bound is tight. The same varieties
provide examples where a previous bound of Blekherman-Teitler on the maximal
$X$-rank is tight. We also give examples of varieties $X$ for which the gap
between maximal complex and the maximal real rank is arbitrarily large. To
facilitate our constructions we prove a conjecture of Reznick on the maximal
real symmetric rank of symmetric bivariate tensors. Finally we study the
geometry of the set of points of maximal real rank in the case of real plane
curves.
