For life, except for some bankruptcy
LIFE!
They have life terms.
Article III judges (most of what you would think of as federal judges - US District, Court of Appeals and Supreme Court) judges serve for life, assuming they are not removed for serious violations of...
A Federal District Judge has a lifetime appointment.