Kisa "serverless" vle di reyèlman?

asked 3 months ago240 viewsht

3

Si pa gen sèvè, kote kòd la kouri? Kisa Lambda oswa Azure Functions ye?

AI diagnosis

AI-generated. Not an answer — the community below confirms or corrects it. Always verify before relying on it.

asked 3 months ago

1 Answer

5
✓
✓ Accepted answer

Gen sèvè, men se pa ou ki jere yo. "Serverless" vle di:

1. Ou bay yon fonksyon (oswa yon konteyè). Founisè cloud la jere machin yo, sistèm operasyon an ak mizajou yo. 2. Li kouri sèlman lè yon evènman rive: yon rekèt HTTP, yon fichye ki telechaje, yon mesaj nan yon ké, yon lè nan jounen an. 3. Li grandi otomatikman: 1 rekèt oswa 10 000, li jere l. 4. Ou peye pou tan egzekisyon an sèlman. Si pa gen trafik, ou prèske pa peye anyen.

// AWS Lambda
export const handler = async (event) => {
  return { statusCode: 200, body: JSON.stringify({ mesaj: 'Bonjou!' }) };
};

Dezavantaj: "cold start" (premye rekèt apre yon ti tan ka pi lan), limit tan egzekisyon, e li pi difisil pou debogaj lokalman.

Bon pou: API ki gen trafik iregilye, travay otomatik (resize imaj, voye imèl), webhooks.

Sign in to tell others whether this worked.

answered 3 months ago

Sign in and verify your email to post an answer.