UTI during pregnancy

Brittney • Married 8-14-2014~ Due Oct 5 2017 🎃
This morning I posted to get feedback about macrobid. I took my second dose this morning and it caused me to throw up, which I think is because I only ate a banana before taking the pill. I went to urgent care and the PA I saw prescribed keflex. The keflex makes me nervous bc I'm allergic to penicillin that and the first doctor prescribed 100mg of macrobid twice a day. The doctor today prescribed 500mg three times a day of keflex. Has anyone taken such a large dose of Keflex while pregnant? It makes me nervous.