Downtime is a confirmed risk. On 5xx or 429 responses Googlebot slows down, and indexed URLs "are preserved in the index, but eventually dropped." Google advises a 503 status for an outage of a day or two, never a 503 for robots.txt (that halts all crawling), and a 200 placeholder page for longer closures.
server {
listen 443 ssl; # certificates as in Section 1.6.5
server_name example.com;
root /var/www/maintenance; # holds maintenance.html and robots.txt
add_header Retry-After 7200 always;
error_page 503 /maintenance.html;
location = /robots.txt { try_files $uri =404; }
location = /maintenance.html { internal; }
location / { return 503; }
}